修复更新程序后制造订单状态

This commit is contained in:
jinling.yang
2024-07-17 19:29:21 +08:00
parent 1dcecea3d5
commit 6c2fb043c4

View File

@@ -128,7 +128,8 @@ class MrpProduction(models.Model):
production.state = 'pending_cam'
if production.state == 'progress':
if all(wo_state not in ('progress', 'done') for wo_state in production.workorder_ids.mapped('state')):
if all(wo_state not in ('progress', 'done', 'rework') for wo_state in
production.workorder_ids.mapped('state')):
production.state = 'pending_cam'
# if production.state == 'pending_cam':
# if all(wo_state in 'done' for wo_state in production.workorder_ids.mapped('state')):