洗澡基本参数回显
This commit is contained in:
@@ -43,6 +43,33 @@ class Cutting_toolSpecificationWizard(models.TransientModel):
|
||||
feed_per_tooth_ids_4 = fields.One2many('sf.feed.per.tooth', 'specification_id', '每齿走刀量fz',
|
||||
domain=[('machining_method', '!=', False)])
|
||||
|
||||
def choose_basic_param(self):
|
||||
self.product_id.brand_id = self.brand_id.id
|
||||
self.product_id.cutting_tool_type_id = self.cutting_tool_type_id.id
|
||||
record = self.integral_tool_basic_parameters_ids.browse(id)
|
||||
|
||||
# selected_record = self.integral_tool_basic_parameters_ids.browse(self._context.get('active_id'))
|
||||
if self.cutting_tool_type == '整体式刀具':
|
||||
for record in self.integral_tool_basic_parameters_ids:
|
||||
selected_record1 = self.env['sf.tool.materials.basic.parameters'].browse(self._context.get('active_id'))
|
||||
# 获取选中记录的字段值
|
||||
self.product_id.cutting_tool_total_length = selected_record1.total_length
|
||||
|
||||
|
||||
# self.product_id.blade_diameter = self.integral_tool_basic_parameters_ids[0].blade_diameter
|
||||
# self.product_id.blade_length = self.integral_tool_basic_parameters_ids[0].blade_length
|
||||
# self.product_id.blade = self.integral_tool_basic_parameters_ids[0].shank_diameter
|
||||
# self.product_id.shank_length = self.integral_tool_basic_parameters_ids[0].shank_length
|
||||
|
||||
|
||||
# elif self.cutting_tool_type == '刀片':
|
||||
#
|
||||
# elif self.cutting_tool_type == '刀杆':
|
||||
#
|
||||
# elif self.cutting_tool_type == '刀盘':
|
||||
#
|
||||
# elif self.cutting_tool_type == '刀柄':
|
||||
|
||||
@api.depends('cutting_tool_library_id', 'cutting_tool_type')
|
||||
def set_specification(self):
|
||||
self.integral_tool_basic_parameters_ids = False
|
||||
@@ -96,17 +123,3 @@ class Cutting_toolSpecificationWizard(models.TransientModel):
|
||||
item.chuck_basic_parameters_ids = chuck_basic_parameters
|
||||
|
||||
|
||||
def choose_basic_param(self):
|
||||
self.product_id.brand_id = self.brand_id.id
|
||||
# self.product_id.brand_id = self.brand_id.id
|
||||
# if self.cutting_tool_type == '整体式刀具':
|
||||
# self.product_id.brand_id = self.brand_id.id
|
||||
#
|
||||
# elif self.cutting_tool_type == '刀片':
|
||||
#
|
||||
# elif self.cutting_tool_type == '刀杆':
|
||||
#
|
||||
# elif self.cutting_tool_type == '刀盘':
|
||||
#
|
||||
# elif self.cutting_tool_type == '刀柄':
|
||||
|
||||
|
||||
Reference in New Issue
Block a user