diff --git a/jikimo_purchase_request/models/product_template.py b/jikimo_purchase_request/models/product_template.py index c4f2a589..623c0981 100644 --- a/jikimo_purchase_request/models/product_template.py +++ b/jikimo_purchase_request/models/product_template.py @@ -13,11 +13,7 @@ class ProductTemplate(models.Model): template_id.purchase_request = product_id.purchase_request return template_id - -class ProdcutProduct(models.Model): - _inherit = 'product.product' - def copy_template(self, product_template_id): """ 复制成品模板时,复制采购申请 """ - super(ProdcutProduct, self).copy_template(product_template_id) + super(ProductTemplate, self).copy_template(product_template_id) self.purchase_request = product_template_id.purchase_request diff --git a/jikimo_sale_multiple_supply_methods/models/product_template.py b/jikimo_sale_multiple_supply_methods/models/product_template.py index 85190cab..cd730998 100644 --- a/jikimo_sale_multiple_supply_methods/models/product_template.py +++ b/jikimo_sale_multiple_supply_methods/models/product_template.py @@ -6,10 +6,6 @@ class ProductTemplate(models.Model): is_manual_processing = fields.Boolean(string='人工线下加工') is_customer_provided = fields.Boolean(string='客供料') - -class ProductProduct(models.Model): - _inherit = 'product.product' - def copy_template(self, product_template_id): if not isinstance(product_template_id, ProductTemplate): raise ValueError('%s必须是ProductTemplate类型' % product_template_id) diff --git a/sf_dlm/models/product_supplierinfo.py b/sf_dlm/models/product_supplierinfo.py index a46f4856..f4278e03 100644 --- a/sf_dlm/models/product_supplierinfo.py +++ b/sf_dlm/models/product_supplierinfo.py @@ -17,7 +17,7 @@ class ResProductCategory(models.Model): class ResProductProduct(models.Model): _inherit = 'product.product' - single_manufacturing = fields.Boolean(string="单个制造") + # single_manufacturing = fields.Boolean(string="单个制造") is_bfm = fields.Boolean('业务平台是否自动创建', default=False) diff --git a/sf_manufacturing/models/sale_order.py b/sf_manufacturing/models/sale_order.py index 8251a78d..48a7cb02 100644 --- a/sf_manufacturing/models/sale_order.py +++ b/sf_manufacturing/models/sale_order.py @@ -56,7 +56,7 @@ class SaleOrder(models.Model): 'jikimo_sale_multiple_supply_methods.product_template_manual_processing').sudo() # 复制成品模板上的属性 - line.product_id.copy_template(product_template_id) + line.product_id.product_tmpl_id.copy_template(product_template_id) # 将模板上的single_manufacturing属性复制到成品上 # line.product_id.single_manufacturing = product_template_id.single_manufacturing # line.product_id.tracking = product_template_id.tracking