修改工单重复,业务平台分配工厂自动生成产品部分新增字段

This commit is contained in:
jinling.yang
2022-11-08 18:36:36 +08:00
parent 8bb2af1f2a
commit aadbd80422
10 changed files with 77 additions and 19 deletions

View File

@@ -20,4 +20,20 @@ class ResMrpWorkOrder(models.Model):
('解除装夹', '解除装夹'),
], string="工序类型")
def json_workorder_str(self, k, production, route):
workorders_values_str = [0, '', {
'product_uom_id': production.product_uom_id.id,
'qty_producing': 0,
'operation_id': False,
'name': route.route_workcenter_id.name,
'processing_panel': k,
'routing_type': route.routing_type,
'workcenter_id': self.env['mrp.routing.workcenter'].get_workcenter(route.workcenter_ids.ids),
'date_planned_start': False,
'date_planned_finished': False,
'duration_expected': 60,
'duration': 0
}]
return workorders_values_str