解决 制造订单提交返工-申请重新编程-第一张工单状态不对 bug

This commit is contained in:
yuxianghui
2024-07-30 09:21:08 +08:00
parent 683d79a4e3
commit a0ed14aed1

View File

@@ -910,6 +910,7 @@ class ResMrpWorkOrder(models.Model):
# if workorder.state not in ['cancel', 'rework']:
# workorder.state = 'rework'
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.state in ['ready']: