From f4f87555a849dac8b3483c8d01f19c0b0252c2e3 Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Wed, 15 Jan 2025 01:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E9=99=A4=E5=9D=AF=E6=96=99=E5=88=B6?= =?UTF-8?q?=E9=80=A0=E8=AE=A2=E5=8D=95?= 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 1dd6049a..24d4bdd1 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -1537,7 +1537,7 @@ class MrpProduction(models.Model): product_id = self.env['product.product'].browse(vals['product_id']) is_self_process = product_id.materials_type_id and product_id.materials_type_id.gain_way and product_id.materials_type_id.gain_way != '自加工' is_customer_provided = product_id.is_customer_provided - if not is_custemer_group_id.get(is_customer_provided): + if not is_custemer_group_id.get(is_customer_provided) and is_self_process: is_custemer_group_id[is_customer_provided] = self.env["procurement.group"].create({'name': vals.get('name')}).id # if not (is_first_customer or is_first_not_customer) and is_self_process: # is_first = True