工艺确认创建工单通过工艺设计排序再进行数据生成
This commit is contained in:
@@ -769,7 +769,8 @@ class MrpProduction(models.Model):
|
||||
}]
|
||||
if production.product_id.categ_id.type in ['成品', '坯料']:
|
||||
# # 根据工序设计生成工单
|
||||
for route in production.technology_design_ids:
|
||||
technology_design_ids = sorted(production.technology_design_ids, key=lambda x: x.sequence)
|
||||
for route in technology_design_ids:
|
||||
workorder_has = self.env['mrp.workorder'].search(
|
||||
[('technology_design_id', '=', route.id), ('production_id', '=', production.id)])
|
||||
if not workorder_has:
|
||||
|
||||
Reference in New Issue
Block a user