diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 66d0a678..a7e9398c 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -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'