解决功能刀具组装时选取刀具型号报错问题;
This commit is contained in:
@@ -139,7 +139,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
mrs_cutting_tool_integral_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'sf_functional_tool_assembly_order_id',
|
||||
string='整体式刀具型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '整体式刀具')])
|
||||
[('cutting_tool_type', '=', '整体式刀具')])
|
||||
integral_code = fields.Char('整体式刀具序列号', readonly=True,
|
||||
compute='_compute_mrs_cutting_tool_integral_model_ids')
|
||||
integral_name = fields.Char('整体式刀具名称', readonly=True)
|
||||
@@ -147,7 +147,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
# 刀片型号
|
||||
mrs_cutting_tool_blade_model_ids = fields.Many2many('sf.cutting.tool.model', 'sf_functional_tool_assembly_order_id',
|
||||
string='刀片型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀片')])
|
||||
[('cutting_tool_type', '=', '刀片')])
|
||||
blade_code = fields.Char('刀片序列号', readonly=True, compute='_compute_mrs_cutting_tool_blade_model_ids')
|
||||
blade_name = fields.Char('刀片名称', readonly=True)
|
||||
sf_tool_brand_id_2 = fields.Many2one('sf.machine.brand', '刀片品牌', readonly=True)
|
||||
@@ -155,7 +155,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
mrs_cutting_tool_cutterbar_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'sf_functional_tool_assembly_order_id',
|
||||
string='刀杆型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀杆')])
|
||||
[('cutting_tool_type', '=', '刀杆')])
|
||||
bar_code = fields.Char('刀杆序列号', readonly=True, compute='_compute_mrs_cutting_tool_cutterbar_model_ids')
|
||||
bar_name = fields.Char('刀杆名称', readonly=True)
|
||||
sf_tool_brand_id_3 = fields.Many2one('sf.machine.brand', '刀杆品牌', readonly=True)
|
||||
@@ -163,7 +163,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
mrs_cutting_tool_cutterpad_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'sf_functional_tool_assembly_order_id',
|
||||
string='刀盘型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀盘')])
|
||||
[('cutting_tool_type', '=', '刀盘')])
|
||||
pad_code = fields.Char('刀盘序列号', readonly=True, compute='_compute_mrs_cutting_tool_cutterpad_model_ids')
|
||||
pad_name = fields.Char('刀盘名称', readonly=True)
|
||||
sf_tool_brand_id_4 = fields.Many2one('sf.machine.brand', '刀盘品牌', readonly=True)
|
||||
@@ -172,7 +172,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
mrs_cutting_tool_cutterhandle_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'sf_functional_tool_assembly_order_id',
|
||||
string='刀柄型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀柄')])
|
||||
[('cutting_tool_type', '=', '刀柄')])
|
||||
handle_code = fields.Char('刀柄序列号', readonly=True, compute='_compute_mrs_cutting_tool_cutterhandle_model_ids')
|
||||
handle_name = fields.Char('刀柄名称', readonly=True)
|
||||
sf_tool_brand_id_5 = fields.Many2one('sf.machine.brand', '刀柄品牌', readonly=True)
|
||||
@@ -180,7 +180,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
mrs_cutting_tool_cutterhead_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'sf_functional_tool_assembly_order_id',
|
||||
string='夹头型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '夹头')])
|
||||
[('cutting_tool_type', '=', '夹头')])
|
||||
chuck_code = fields.Char('夹头序列号', readonly=True, compute='_compute_mrs_cutting_tool_cutterhead_model_ids')
|
||||
chuck_name = fields.Char('夹头名称', readonly=True)
|
||||
sf_tool_brand_id_6 = fields.Many2one('sf.machine.brand', '夹头品牌', readonly=True)
|
||||
@@ -201,7 +201,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.integral_code = val.code
|
||||
self.integral_name = val.name
|
||||
self.sf_tool_brand_id_1 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_1 = val.brand_id.id
|
||||
|
||||
@api.depends('mrs_cutting_tool_blade_model_ids')
|
||||
def _compute_mrs_cutting_tool_blade_model_ids(self):
|
||||
@@ -211,7 +211,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.blade_code = val.code
|
||||
self.blade_name = val.name
|
||||
self.sf_tool_brand_id_2 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_2 = val.brand_id.id
|
||||
|
||||
@api.depends('mrs_cutting_tool_cutterbar_model_ids')
|
||||
def _compute_mrs_cutting_tool_cutterbar_model_ids(self):
|
||||
@@ -221,7 +221,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.bar_code = val.code
|
||||
self.bar_name = val.name
|
||||
self.sf_tool_brand_id_3 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_3 = val.brand_id.id
|
||||
|
||||
@api.depends('mrs_cutting_tool_cutterpad_model_ids')
|
||||
def _compute_mrs_cutting_tool_cutterpad_model_ids(self):
|
||||
@@ -231,7 +231,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.pad_code = val.code
|
||||
self.pad_name = val.name
|
||||
self.sf_tool_brand_id_4 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_4 = val.brand_id.id
|
||||
|
||||
@api.depends('mrs_cutting_tool_cutterhandle_model_ids')
|
||||
def _compute_mrs_cutting_tool_cutterhandle_model_ids(self):
|
||||
@@ -241,7 +241,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.handle_code = val.code
|
||||
self.handle_name = val.name
|
||||
self.sf_tool_brand_id_5 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_5 = val.brand_id.id
|
||||
|
||||
@api.depends('mrs_cutting_tool_cutterhead_model_ids')
|
||||
def _compute_mrs_cutting_tool_cutterhead_model_ids(self):
|
||||
@@ -251,7 +251,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.chuck_code = val.code
|
||||
self.chuck_name = val.name
|
||||
self.sf_tool_brand_id_6 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_6 = val.brand_id.id
|
||||
|
||||
def functional_tool_assembly(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user