This commit is contained in:
jinling.yang
2024-07-30 10:19:16 +08:00

View File

@@ -910,6 +910,7 @@ class ResMrpWorkOrder(models.Model):
# if workorder.state not in ['cancel', 'rework']: # if workorder.state not in ['cancel', 'rework']:
# workorder.state = 'rework' # workorder.state = 'rework'
if workorder.routing_type == '装夹预调' and workorder.state in ['waiting', 'ready', 'pending']: if workorder.routing_type == '装夹预调' and workorder.state in ['waiting', 'ready', 'pending']:
if workorder.production_id.programming_state == '已编程':
# 当工单对应制造订单的功能刀具状态为 【无效刀】时,先对的第一个装夹预调工单状态设置为 【等待组件】 # 当工单对应制造订单的功能刀具状态为 【无效刀】时,先对的第一个装夹预调工单状态设置为 【等待组件】
if workorder.production_id.tool_state in ['1', '2']: if workorder.production_id.tool_state in ['1', '2']:
if workorder.state in ['ready']: if workorder.state in ['ready']: