From a8e4c7d9a0f96bde61a5b9bd7aaba53481b704d5 Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Tue, 13 May 2025 10:24:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=8B=A8=E5=8D=95=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index df303c9c..f8475338 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1553,7 +1553,8 @@ class ResMrpWorkOrder(models.Model): lambda wo: wo.is_subcontract == True and wo.state != 'cancel').sorted('sequence') if self == subcontract_workorders[-1]: # 给下一个库存移动就绪 - self.move_subcontract_workorder_ids[0].move_dest_ids._action_done() + if self.move_subcontract_workorder_ids: + self.move_subcontract_workorder_ids[0].move_dest_ids._action_done() # self.production_id.button_mark_done() tem_date_planned_finished = record.date_planned_finished tem_date_finished = record.date_finished