1、更具制造订单功能刀具状态变更第一个装夹预调工单的工单状态

This commit is contained in:
yuxianghui
2024-07-24 16:20:48 +08:00
parent b88b0fc38a
commit 001b2ead57

View File

@@ -777,6 +777,8 @@ class ResMrpWorkOrder(models.Model):
if workorder.production_id.is_rework is True:
if re_work or cnc_workorder:
workorder.state = 'waiting'
if workorder.production_id.tool_state in ['1', '2'] and workorder.state != 'pending':
workorder.state = 'waiting'
elif workorder.routing_type == 'CNC加工' and workorder.state not in ['done', 'rework', 'cancel']:
pre_workorder = self.env['mrp.workorder'].search(