From 736a18518c7764aeb9fda84d1351aeb4e473bf78 Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Mon, 21 Oct 2024 16:07:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E9=80=A0=E8=AE=A2=E5=8D=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=AE=A2=E5=8D=95=E4=BA=A4=E6=9C=9F=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 3269164c..6584b04f 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -38,7 +38,7 @@ class MrpProduction(models.Model): def _compute_deadline_of_delivery(self): for production in self: sale_order_ids = production.procurement_group_id.mrp_production_ids.move_dest_ids.group_id.sale_id.ids - if len(sale_order_ids) < 1: + if not sale_order_ids or len(sale_order_ids) < 1: continue sale_id = self.env['sale.order'].sudo().browse(sale_order_ids[0]) if sale_id: