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