From dbaf5342fccf0886a57466397b3575b9248c091f Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Wed, 26 Feb 2025 13:09:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=AF=B9=E5=88=87=E5=89=B2?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E7=9A=84=E7=BC=96=E7=A8=8B=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index b14955e4..f7673dcd 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1217,10 +1217,9 @@ class ResMrpWorkOrder(models.Model): # ================= 如果制造订单制造类型为【人工线下加工】========================== if (workorder.production_id.production_type == '人工线下加工' and workorder.production_id.schedule_state == '已排' - and workorder.routing_type == '人工线下加工' and len(workorder.production_id.picking_ids.filtered( - lambda w: w.state not in ['done', 'cancel'])) == 0 - and workorder.production_id.programming_state == '已编程'): + lambda w: w.state not in ['done', 'cancel'])) == 0): + # and workorder.production_id.programming_state == '已编程' if workorder.is_subcontract is True: purchase_orders_id = self._get_surface_technics_purchase_ids() if purchase_orders_id.state == 'purchase': @@ -1236,6 +1235,9 @@ class ResMrpWorkOrder(models.Model): else: workorder.state = 'waiting' continue + elif workorder.routing_type == '人工线下加工': + if workorder.production_id.programming_state == '已编程': + workorder.state = 'ready' else: workorder.state = 'ready' continue