注释代码

This commit is contained in:
jinling.yang
2024-07-28 11:47:12 +08:00
parent 36a2bcca6e
commit 39214e5352
4 changed files with 65 additions and 61 deletions

View File

@@ -827,14 +827,18 @@ class ResMrpWorkOrder(models.Model):
('sequence', '=', workorder.sequence - 1),
('state', 'in', ['done'])])
if unclamp_workorder:
workorder.state = 'ready'
if workorder.is_subcontract is False:
workorder.state = 'ready'
# else:
# else:
# if workorder.state not in ['cancel', 'rework']:
# workorder.state = 'rework'
if workorder.production_id.state == 'pending_cam':
if workorder.routing_type == '装夹预调' and workorder.state in ['ready', 'waiting']:
if workorder.production_id.tool_state in ['1', '2']:
workorder.state = 'waiting'
# if workorder.production_id.state == 'pending_cam':
# if workorder.routing_type == '装夹预调' and workorder.state in ['ready', 'waiting']:
# if workorder.production_id.tool_state in ['1', '2']:
# workorder.state = 'waiting'
logging.info('工序:%s' % workorder.sequence)
logging.info('工单最终状态:%s' % workorder.state)