新增表面工艺外协需求
This commit is contained in:
@@ -11,7 +11,8 @@ class ResMrpRoutingWorkcenter(models.Model):
|
||||
('CNC加工', 'CNC加工'),
|
||||
('后置三元质量检测', '后置三元质量检测'),
|
||||
('解除装夹', '解除装夹'),
|
||||
('切割', '切割')
|
||||
('切割', '切割'),
|
||||
('绑定表面工艺', '绑定表面工艺')
|
||||
], string="工序类型")
|
||||
is_repeat = fields.Boolean('重复', default=False)
|
||||
workcenter_id = fields.Many2one('mrp.workcenter', required=False)
|
||||
@@ -42,8 +43,10 @@ class ResMrpRoutingWorkcenter(models.Model):
|
||||
print(item.name)
|
||||
if item.machine_tool_id:
|
||||
machine_tool = self.env['sf.machine_tool'].search(
|
||||
[('x_axis', '>', product.bom_ids.bom_line_ids.product_id.length), ('y_axis', '>', product.bom_ids.bom_line_ids.product_id.width),
|
||||
('z_axis', '>', product.bom_ids.bom_line_ids.product_id.height), ('id', '=', item.machine_tool_id.id)])
|
||||
[('x_axis', '>', product.bom_ids.bom_line_ids.product_id.length),
|
||||
('y_axis', '>', product.bom_ids.bom_line_ids.product_id.width),
|
||||
('z_axis', '>', product.bom_ids.bom_line_ids.product_id.height),
|
||||
('id', '=', item.machine_tool_id.id)])
|
||||
if machine_tool:
|
||||
workcenter_ids.append(item.id)
|
||||
if len(workcenter_ids) == 1:
|
||||
|
||||
Reference in New Issue
Block a user