This commit is contained in:
yuxianghui
2024-12-25 09:43:04 +08:00
parent 5a1ebabc87
commit 32fb6eadbc

View File

@@ -382,7 +382,7 @@ class MrpProduction(models.Model):
if production.tool_state == '2':
production.state = 'rework'
if production.workorder_ids and all(wo_state in ('done', 'rework', 'cancel') for wo_state in production.workorder_ids.mapped('state')):
if production.state not in ['scrap', 'rework']:
if production.state not in ['scrap', 'rework', 'cancel']:
production.state = 'done'