diff --git a/sf_base/models/tool_base_new.py b/sf_base/models/tool_base_new.py index 354b7b79..1c7219bc 100644 --- a/sf_base/models/tool_base_new.py +++ b/sf_base/models/tool_base_new.py @@ -111,11 +111,16 @@ class CuttingToolModel(models.Model): material_model_id = fields.Many2one('sf.materials.model', '材料型号') # 适用夹头型号可以多选 - chuck_ids = fields.Many2many( + # chuck_ids = fields.Many2many( + # 'sf.cutting_tool.standard.library', + # relation='cutting_tool_type_library_handle_chuck_rel', + # column1='model_id_1', + # column2='model_id_2', + # domain="[('cutting_tool_material_id.name', '=', '夹头')]", + # string='适用夹头型号') + + chuck_id = fields.Many2one( 'sf.cutting_tool.standard.library', - relation='cutting_tool_type_library_handle_chuck_rel', - column1='model_id_1', - column2='model_id_2', domain="[('cutting_tool_material_id.name', '=', '夹头')]", string='适用夹头型号') cutter_bar_ids = fields.Many2many( @@ -135,22 +140,28 @@ class CuttingToolModel(models.Model): string='适用刀盘型号' # 使用空列表作为默认值 ) # 刀杆/参数 - blade_ids = fields.Many2many( + # blade_ids = fields.Many2many( + # 'sf.cutting_tool.standard.library', + # relation='cutting_tool_type_library_pad_blade_rel', + # column1='model_id_1', + # column2='model_id_2', + # domain="[('cutting_tool_material_id.name', '=', '刀片')]", + # string='适用刀片型号' # 使用空列表作为默认值 + # ) + + handle_id = fields.Many2one( 'sf.cutting_tool.standard.library', - relation='cutting_tool_type_library_pad_blade_rel', - column1='model_id_1', - column2='model_id_2', - domain="[('cutting_tool_material_id.name', '=', '刀片')]", - string='适用刀片型号' # 使用空列表作为默认值 - ) - handle_ids = fields.Many2many( - 'sf.cutting_tool.standard.library', - relation='cutting_tool_type_library_chuck_handle_rel', - column1='model_id_1', - column2='model_id_2', domain="[('cutting_tool_material_id.name', '=', '刀柄')]", string='适用刀柄型号' ) + # handle_ids = fields.Many2many( + # 'sf.cutting_tool.standard.library', + # relation='cutting_tool_type_library_chuck_handle_rel', + # column1='model_id_1', + # column2='model_id_2', + # domain="[('cutting_tool_material_id.name', '=', '刀柄')]", + # string='适用刀柄型号' + # ) active = fields.Boolean('有效', default=True) is_cloud = fields.Boolean('云端数据', default=False) @@ -172,7 +183,7 @@ class MaintenanceStandardImage(models.Model): image = fields.Binary(string='图文') type = fields.Selection( [('加工能力', '加工能力'), ('刀尖特征', '刀尖特征'), ('柄部类型', '柄部类型'), ('走刀方向', '走刀方向'), - ('冷却液', '冷却液'), ('压紧方式', '压紧方式'), ('刀片形状', '刀片形状'), ('冷却方式', '冷却方式')], + ('压紧方式', '压紧方式'), ('刀片形状', '刀片形状'), ('冷却方式', '冷却方式')], string='特征') equipment_id = fields.Many2many('maintenance.equipment', 'image_id', string='设备') equipment_lq_id = fields.Many2many('maintenance.equipment', 'image_lq_id', string='设备') diff --git a/sf_base/models/tool_other_features.py b/sf_base/models/tool_other_features.py index 23600322..154bf275 100644 --- a/sf_base/models/tool_other_features.py +++ b/sf_base/models/tool_other_features.py @@ -54,8 +54,6 @@ class ToolMaterialsBasicParameters(models.Model): string='刀片的刃数(个)', default='0') main_included_angle = fields.Integer('主偏角(°)') top_angle = fields.Integer('顶角(°)') - blade_tip_dip_angle = fields.Integer('刀尖倾角(°)') - side_cutting_edge_angle = fields.Integer('侧切削角(°)') thread_model = fields.Selection([('无', '无'), ('外螺纹', '外螺纹'), ('内螺纹', '内螺纹')], string='螺纹类型', default='无') thread_num = fields.Float('每英寸螺纹数(tpi)') @@ -90,7 +88,7 @@ class ToolMaterialsBasicParameters(models.Model): cutter_head_diameter = fields.Float('刀盘直径(mm)') interface_diameter = fields.Float('接口直径(mm)') # 刀柄参数 - flange_shank_length = fields.Float('法兰柄长(mm)') + flange_shank_length = fields.Float('法兰长(mm)') flange_diameter = fields.Float('法兰直径(mm)') fit_chuck_size = fields.Char('适配夹头尺寸') handle_external_diameter = fields.Float('柄部外径(mm)') @@ -109,17 +107,14 @@ class ToolMaterialsBasicParameters(models.Model): diameter_slip_accuracy = fields.Char('径跳精度(mm)', size=20) cooling_model = fields.Char('冷却类型', size=20) taper_shank_model = fields.Char('锥柄型号') - is_rough_machining = fields.Boolean('可粗加工', default=False) - is_finish_machining = fields.Boolean('可精加工', default=False) is_quick_cutting = fields.Boolean('可高速切削', default=False) - is_drill_hole = fields.Boolean('可钻孔', default=False) is_safe_lock = fields.Boolean('有无安全锁', default=False) chuck_id = fields.Many2one( 'sf.cutting_tool.standard.library', domain="[('cutting_tool_material_id.name', '=', '夹头')]", string='适配夹头型号' # 使用空列表作为默认值 ) - nut = fields.Char('适用锁紧螺母型号') + nut = fields.Char('适配锁紧螺母型号') # 夹头参数 er_size_model = fields.Char('ER尺寸型号', size=20) @@ -131,11 +126,6 @@ class ToolMaterialsBasicParameters(models.Model): clamping_length = fields.Float('夹持长度(mm)') clamping_tolerance = fields.Char('夹持公差(mm)', size=20) cooling_jacket = fields.Char('适用冷却套型号', size=50) - handle_id = fields.Many2one( - 'sf.cutting_tool.standard.library', - domain="[('cutting_tool_material_id.name', '=', '刀柄')]", - string='适用刀柄型号' - ) active = fields.Boolean(string='有效', default=True) diff --git a/sf_base/views/tool_basic_param.xml b/sf_base/views/tool_basic_param.xml index 350c38f1..616905ca 100644 --- a/sf_base/views/tool_basic_param.xml +++ b/sf_base/views/tool_basic_param.xml @@ -46,8 +46,6 @@ - - diff --git a/sf_base/views/tool_views.xml b/sf_base/views/tool_views.xml index 68ed8bda..f0e79d5f 100644 --- a/sf_base/views/tool_views.xml +++ b/sf_base/views/tool_views.xml @@ -157,6 +157,12 @@ + + - + @@ -223,7 +229,7 @@ - + @@ -234,24 +240,22 @@ - - - - - + + + + - + + + + - - - - @@ -262,29 +266,29 @@ - - - - - + + + + + - + + - - - - + + + @@ -299,13 +303,13 @@ - + + - + - @@ -316,26 +320,25 @@ + + + - + + + - - - - - - + + + + + - - - - - - + + - - - - - diff --git a/sf_dlm_management/views/product_template_management_view.xml b/sf_dlm_management/views/product_template_management_view.xml index 2d3067ea..94cb4b7f 100644 --- a/sf_dlm_management/views/product_template_management_view.xml +++ b/sf_dlm_management/views/product_template_management_view.xml @@ -176,6 +176,10 @@ options="{'format': false}" attrs="{'readonly': [('id', '!=', False)]}"/> + + - -