Merge branch 'develop' into feature/sf品牌页面表格样式的修改
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
'views/common_view.xml',
|
||||
'views/fixture_view.xml',
|
||||
'views/functional_fixture_view.xml',
|
||||
'views/tool_other_features_view.xml',
|
||||
'views/menu_view.xml',
|
||||
"views/tool_views.xml",
|
||||
"views/tool_menu.xml",
|
||||
|
||||
@@ -3,7 +3,6 @@ from . import common
|
||||
from . import tool_base_new
|
||||
from . import fixture
|
||||
from . import functional_fixture
|
||||
from . import tool_other_features
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,12 +24,7 @@ access_sf_fixture_model,sf_fixture_model,model_sf_fixture_model,base.group_user,
|
||||
access_sf_functional_fixture_type,sf_functional_fixture_type,model_sf_functional_fixture_type,base.group_user,1,1,1,1
|
||||
access_sf_functional_fixture,sf_functional_fixture,model_sf_functional_fixture,base.group_user,1,1,1,1
|
||||
access_sf_sync_common,sf_sync_common,model_sf_sync_common,base.group_user,1,1,1,1
|
||||
access_sf_suitable_machining_method,sf_suitable_machining_method,model_sf_suitable_machining_method,base.group_user,1,1,1,1
|
||||
access_sf_blade_tip_characteristics,sf_blade_tip_characteristics,model_sf_blade_tip_characteristics,base.group_user,1,1,1,1
|
||||
access_sf_handle_type,sf_handle_type,model_sf_handle_type,base.group_user,1,1,1,1
|
||||
access_sf_cutting_direction,sf_cutting_direction,model_sf_cutting_direction,base.group_user,1,1,1,1
|
||||
access_sf_suitable_coolant,sf_suitable_coolant,model_sf_suitable_coolant,base.group_user,1,1,1,1
|
||||
access_sf_cutting_speed,sf_cutting_speed,model_sf_cutting_speed,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -211,22 +211,51 @@
|
||||
</group>
|
||||
</group>
|
||||
<group string="适合加工方式">
|
||||
<field name="suitable_machining_method_ids" string=""/>
|
||||
<field name="suitable_machining_method_ids" string="" widget="many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="刀尖特征">
|
||||
<field name="blade_tip_characteristics_ids" string=""/>
|
||||
<field name="blade_tip_characteristics_ids" string="" widget="many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="柄部类型">
|
||||
<field name="handle_type_ids" string=""/>
|
||||
<field name="handle_type_ids" string="" widget="many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="走刀方向">
|
||||
<field name="cutting_direction_ids" string=""/>
|
||||
<field name="cutting_direction_ids" string="" widget="many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="适合冷却液">
|
||||
<field name="suitable_coolant_ids" string=""/>
|
||||
<field name="suitable_coolant_ids" string="" widget="many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="切削速度Vc">
|
||||
<field name="cutting_speed_ids" string=""/>
|
||||
<field name="cutting_speed_ids" string="" widget="one2many">
|
||||
<tree editable="bottom">
|
||||
<!-- <field name="order"/>-->
|
||||
<field name="execution_standard_id"/>
|
||||
<field name="material_code"/>
|
||||
<field name="material_name"/>
|
||||
<field name="material_grade"/>
|
||||
<field name="tensile_strength"/>
|
||||
<field name="hardness"/>
|
||||
<field name="cutting_speed_n1"/>
|
||||
<field name="cutting_speed_n2"/>
|
||||
<field name="cutting_speed_n3"/>
|
||||
<field name="cutting_speed_n4"/>
|
||||
<field name="cutting_speed_n5"/>
|
||||
<field name="rough_machining"/>
|
||||
<field name="precision_machining"/>
|
||||
<field name="application"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group string="每齿走刀量fz">
|
||||
<field name="feed_per_tooth_ids" string="" widget="one2many">
|
||||
<tree editable="bottom">
|
||||
<field name="cutting_speed" attrs="{'readonly': [('materials_type_id','!=',False)]}"/>
|
||||
<field name="materials_type_id" attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
||||
<field name="blade_diameter"/>
|
||||
<field name="feed_per_tooth"/>
|
||||
<field name="unit"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
'views/mrp_workcenter_views.xml',
|
||||
'views/mrp_workorder_view.xml',
|
||||
'views/production_line_view.xml',
|
||||
'views/tool_other_features_view.xml',
|
||||
# 'views/tray_view.xml',
|
||||
'views/model_type_view.xml',
|
||||
# 'views/kanban_change.xml'
|
||||
|
||||
@@ -9,6 +9,7 @@ from . import mrp_routing_workcenter
|
||||
from . import stock
|
||||
from . import res_user
|
||||
from . import production_line_base
|
||||
from . import tool_other_features
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -100,7 +100,8 @@ class ResProductMo(models.Model):
|
||||
cutting_direction_ids = fields.Many2many('sf.cutting.direction', 'rel_cutting_direction_product_template', '走刀方向')
|
||||
suitable_coolant_ids = fields.Many2many('sf.suitable.coolant', 'rel_suitable_coolant_product_template', '适合冷却液')
|
||||
|
||||
cutting_speed_ids = fields.Many2many('sf.cutting.speed', 'rel_sf_cutting_speed', '切削速度Vc')
|
||||
cutting_speed_ids = fields.One2many('sf.cutting.speed', 'product_template_id', string='切削速度Vc')
|
||||
feed_per_tooth_ids = fields.One2many('sf.feed.per.tooth', 'product_template_id', string='每齿走刀量fz')
|
||||
|
||||
@api.constrains('suitable_machining_method_ids')
|
||||
def _check_suitable_machining_method_ids(self):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from odoo import fields, models
|
||||
from odoo import fields, models, api
|
||||
|
||||
|
||||
class SuitableMachiningMethod(models.Model):
|
||||
@@ -56,12 +56,14 @@ class CuttingSpeed(models.Model):
|
||||
#
|
||||
# order = fields.Char('序', default=_get_order, readonly=True)
|
||||
|
||||
product_template_id = fields.Many2one('product.template', string='产品')
|
||||
|
||||
execution_standard_id = fields.Char('执行标准')
|
||||
material_code = fields.Char('材料代号')
|
||||
material_name = fields.Char('材料名称')
|
||||
material_grade = fields.Char('材料牌号')
|
||||
tensile_strength = fields.Char('拉伸强度 (N/mm²)')
|
||||
hardness = fields.Char('硬度(HRC)')
|
||||
tensile_strength = fields.Float('拉伸强度 (N/mm²)')
|
||||
hardness = fields.Float('硬度(HRC)')
|
||||
|
||||
cutting_speed_n1 = fields.Char('径向切宽 ae=100%D1 ap=1*D1 切削速度Vc')
|
||||
cutting_speed_n2 = fields.Char('径向切宽 ae=50%D1 ap=1.5*D1 切削速度Vc')
|
||||
@@ -70,4 +72,22 @@ class CuttingSpeed(models.Model):
|
||||
cutting_speed_n5 = fields.Char('径向切宽 ae=5%D1 ap=L1max 切削速度Vc')
|
||||
rough_machining = fields.Char('粗加工 Vc(m/min)')
|
||||
precision_machining = fields.Char('精加工 Vc(m/min)')
|
||||
application = fields.Selection([('主应用', '主应用'), ('次应用', '次应用')], '主/次应用')
|
||||
application = fields.Selection([('主应用', '主应用'), ('次应用', '次应用')], '主/次应用')
|
||||
|
||||
|
||||
class FeedPerTooth(models.Model):
|
||||
_name = 'sf.feed.per.tooth'
|
||||
_description = '每齿走刀量fz'
|
||||
|
||||
product_template_id = fields.Many2one('product.template', string='产品')
|
||||
|
||||
cutting_speed = fields.Char('径向切宽 ae(mm)')
|
||||
materials_type_id = fields.Many2one('sf.materials.model', string='材料型号')
|
||||
blade_diameter = fields.Float('刃部直径D1(mm)', readonly=True, compute='_compute_product_template_id')
|
||||
feed_per_tooth = fields.Char('每齿走刀量 (mm/z)')
|
||||
unit = fields.Char('单位', default='fz')
|
||||
|
||||
@api.depends('product_template_id')
|
||||
def _compute_product_template_id(self):
|
||||
if self.product_template_id is not None:
|
||||
self.blade_diameter = self.product_template_id.integral_blade_diameter
|
||||
@@ -7,6 +7,12 @@ access_sf_surface_technics_model_type_routing_sort,sf_surface_technics_model_typ
|
||||
|
||||
access_sf_production_line,sf.production.line,model_sf_production_line,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
access_sf_suitable_machining_method,sf_suitable_machining_method,model_sf_suitable_machining_method,base.group_user,1,1,1,1
|
||||
access_sf_blade_tip_characteristics,sf_blade_tip_characteristics,model_sf_blade_tip_characteristics,base.group_user,1,1,1,1
|
||||
access_sf_handle_type,sf_handle_type,model_sf_handle_type,base.group_user,1,1,1,1
|
||||
access_sf_cutting_direction,sf_cutting_direction,model_sf_cutting_direction,base.group_user,1,1,1,1
|
||||
access_sf_suitable_coolant,sf_suitable_coolant,model_sf_suitable_coolant,base.group_user,1,1,1,1
|
||||
access_sf_cutting_speed,sf_cutting_speed,model_sf_cutting_speed,base.group_user,1,1,1,1
|
||||
access_sf_feed_per_tooth,sf_feed_per_tooth,model_sf_feed_per_tooth,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
||||
|
@@ -105,7 +105,7 @@
|
||||
<field name="name">切削速度Vc</field>
|
||||
<field name="model">sf.cutting.speed</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="切削速度Vc" editable="bottom">
|
||||
<tree string="切削速度Vc" create="1">
|
||||
<!-- <field name="order"/>-->
|
||||
<field name="execution_standard_id"/>
|
||||
<field name="material_code"/>
|
||||
@@ -131,4 +131,27 @@
|
||||
<field name="res_model">sf.cutting.speed</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- ======================================== 每齿走刀量fz========================================-->
|
||||
<record model="ir.ui.view" id="sf_feed_per_tooth_tree">
|
||||
<field name="name">每齿走刀量fz</field>
|
||||
<field name="model">sf.feed.per.tooth</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="cutting_speed" attrs="{'readonly': [('materials_type_id','!=',False)]}"/>
|
||||
<field name="materials_type_id" attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
||||
<field name="blade_diameter"/>
|
||||
<field name="feed_per_tooth"/>
|
||||
<field name="unit"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_feed_per_tooth_act" model="ir.actions.act_window">
|
||||
<field name="name">每齿走刀量fz</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.feed.per.tooth</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -102,6 +102,9 @@ class SfToolMaterialSearch(models.Model):
|
||||
cutting_direction_ids = fields.Many2many('sf.cutting.direction', 'rel_cutting_direction', '走刀方向')
|
||||
suitable_coolant_ids = fields.Many2many('sf.suitable.coolant', 'rel_suitable_coolant', '适合冷却液')
|
||||
|
||||
cutting_speed_ids = fields.Many2many('sf.cutting.speed', string='切削速度Vc')
|
||||
feed_per_tooth_ids = fields.Many2many('sf.feed.per.tooth', 'rel_feed_per_tooth_ids', '每齿走刀量fz')
|
||||
|
||||
@api.constrains('suitable_machining_method_ids')
|
||||
def _check_suitable_machining_method_ids(self):
|
||||
for record in self:
|
||||
|
||||
@@ -240,6 +240,12 @@
|
||||
<field name="suitable_coolant_ids" string=""/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="切削速度Vc" attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')]}">
|
||||
<field name="cutting_speed_ids" string=""/>
|
||||
</page>
|
||||
<page string="每齿走刀量fz" attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')]}">
|
||||
<field name="feed_per_tooth_ids" string=""/>
|
||||
</page>
|
||||
<page string="刀杆信息" attrs="{'invisible': [('cutting_tool_type','!=','刀杆')]}">
|
||||
<group>
|
||||
<group>
|
||||
|
||||
Reference in New Issue
Block a user