Accept Merge Request #1234: (feature/修复报废-工单状态 -> develop)

Merge Request: 修复报废-工单状态

Created By: @杨金灵
Reviewed By: @马广威
Approved By: @马广威 
Accepted By: @杨金灵
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1234
This commit is contained in:
杨金灵
2024-08-21 16:59:13 +08:00
committed by Coding
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