修复刀具标准库

This commit is contained in:
jinling.yang
2023-11-03 10:42:09 +08:00
parent 53ad002f3b
commit 686c049e52
3 changed files with 11 additions and 5 deletions

View File

@@ -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'],

View File

@@ -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': [

View File

@@ -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