排除坯料制造订单

This commit is contained in:
liaodanlong
2025-01-15 01:44:48 +08:00
parent adbf5a6a0d
commit f4f87555a8

View File

@@ -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