From 686c049e52ec9a5e2cc4195f8188ff04c588cfe0 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Fri, 3 Nov 2023 10:42:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=80=E5=85=B7=E6=A0=87?= =?UTF-8?q?=E5=87=86=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_base/models/tool_other_features.py | 10 ++++++---- sf_dlm/__manifest__.py | 2 +- sf_manufacturing/models/product_template.py | 4 ++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sf_base/models/tool_other_features.py b/sf_base/models/tool_other_features.py index 9d7c57ea..cb7e8eaf 100644 --- a/sf_base/models/tool_other_features.py +++ b/sf_base/models/tool_other_features.py @@ -61,6 +61,9 @@ class ToolMaterialsBasicParameters(models.Model): # 刀杆参数 height = fields.Char('高度(mm)', size=20) blade_height = fields.Char('刃部高度(mm)', size=20) + knife_head_height = fields.Char('刀头高度(mm)', size=20) + knife_head_width = fields.Char('刀头宽度(mm)', size=20) + knife_head_length = fields.Char('刀头长度(mm)', size=20) cut_depth_max = fields.Char('最大切削深度(mm)', size=20) cutter_arbor_diameter = fields.Char('刀杆直径(mm)', size=20) min_machining_aperture = fields.Char('最小加工孔径(mm)', size=20) @@ -182,11 +185,10 @@ class ToolMaterialsBasicParameters(models.Model): 'cutting_tool_type': obj['cutting_tool_type'], 'height': obj['height'], 'width': obj['width'], - 'blade_height': obj['blade_height'], 'total_length': obj['total_length'], - 'blade_width': obj['blade_width'], - 'blade_length': obj['blade_length'], - 'blade_height': obj['blade_height'], + 'knife_head_height': obj['knife_head_height'], + 'knife_head_width': obj['knife_head_width'], + 'knife_head_length': obj['knife_head_length'], 'cutter_arbor_diameter': obj['cutter_arbor_diameter'], 'main_included_angle': obj['main_included_angle'], 'relief_angle': obj['relief_angle'], diff --git a/sf_dlm/__manifest__.py b/sf_dlm/__manifest__.py index 5f692988..ed9e2053 100644 --- a/sf_dlm/__manifest__.py +++ b/sf_dlm/__manifest__.py @@ -10,7 +10,7 @@ """, 'category': 'sf', 'website': 'https://www.sf.jikimo.com', - 'depends': ['mrp', 'base', 'sale', 'sf_manufacturing', 'web_widget_model_viewer', 'mrp_subcontracting', + 'depends': ['mrp', 'base', 'sf_manufacturing', 'web_widget_model_viewer', 'mrp_subcontracting', 'purchase_stock', 'uom', 'jikimo_frontend', 'product'], 'data': [ diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index 6981103d..b1efb4a3 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -288,6 +288,10 @@ class ResProductMo(models.Model): self.cutting_tool_blade_length = self.specification_id.blade_length self.cutting_tool_cutter_head_diameter = self.specification_id.cutter_head_diameter self.cutting_tool_interface_diameter = self.specification_id.interface_diameter + else: + self.cutting_tool_knife_head_height = self.specification_id.knife_head_height + self.cutting_tool_knife_head_width = self.specification_id.knife_head_width + self.cutting_tool_knife_head_length = self.specification_id.knife_head_length elif self.cutting_tool_type == '刀柄': self.cutting_tool_total_length = self.specification_id.total_length self.cutting_tool_standard_speed = self.specification_id.standard_rotate_speed