修复报废-工单状态

This commit is contained in:
jinling.yang
2024-08-21 16:53:32 +08:00
parent f64c21dacd
commit ba986995ed
4 changed files with 7 additions and 8 deletions

View File

@@ -966,10 +966,9 @@ class ResMrpWorkOrder(models.Model):
workorder.state = 'ready'
else:
workorder.state = 'waiting'
# else:
# if workorder.state not in ['cancel', 'rework']:
# workorder.state = 'rework'
elif workorder.production_id.state == 'scrap':
if workorder.routing_type == '解除装夹' and unclamp_workorder.test_results == '报废':
workorder.state = 'waiting'
if workorder.routing_type == '装夹预调' and workorder.state in ['waiting', 'ready', 'pending']:
workorder_ids = workorder.production_id.workorder_ids
work_bo = True