From 6a674cdb5bd7e3bac8e5ef7f4bf84d370b440923 Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Wed, 18 Sep 2024 09:28:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E7=8A=B6=E6=80=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index ff977f7c..996259ae 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1035,6 +1035,10 @@ class ResMrpWorkOrder(models.Model): elif workorder.production_id.reservation_state != 'assigned': workorder.state = 'waiting' continue + elif (workorder.name == '装夹预调' and + workorder.state not in ['rework', 'done', 'cancel']): + if workorder.state != 'pending': + workorder.state = 'pending' if workorder.production_id.tool_state in ['1', '2'] and workorder.state == 'ready': workorder.state = 'waiting' continue