增加坯料冗余量,调整坯料客供料的名称

This commit is contained in:
胡尧
2024-11-18 09:44:50 +08:00
parent 9410ca82db
commit bc0b8bdecb
12 changed files with 84 additions and 27 deletions

View File

@@ -68,7 +68,7 @@ class SaleOrder(models.Model):
# 当成品上带有客供料选项时,生成坯料时选择“客供料”路线
if line.is_incoming_material:
# 将成品模板的内容复制到成品上
customer_provided_embryo = self.env.ref('jikimo_sale_multiple_supply_methods.product_tempalte_raw_material_customer_provided').sudo()
customer_provided_embryo = self.env.ref('jikimo_sale_multiple_supply_methods.product_template_embryo_customer_provided').sudo()
# 创建坯料客供料的批量不需要创建bom
material_customer_provided_embryo = self.env['product.template'].sudo().no_bom_product_create(
customer_provided_embryo.with_context(active_test=False).product_variant_id,