From dd6e8b67077e0ea7a2fc0dfff15c676e45dbd126 Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Thu, 27 Mar 2025 15:21:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=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 12ff3eda..971f331e 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -289,10 +289,10 @@ class MrpProduction(models.Model): sale_order_name = match.group(0) sale_order = self.env['sale.order'].sudo().search( [('name', '=', sale_order_name)]) + logging.info("product_name is :%s" % product_name) filtered_order_line = sale_order.order_line.filtered( lambda production: re.search(f'{product_name}$', production.product_id.name) ) - if filtered_order_line: production_id.part_number = filtered_order_line.part_number production_id.part_name = filtered_order_line.part_name