处理订单客供料的问题

This commit is contained in:
胡尧
2024-11-21 15:48:17 +08:00
parent 8c81315c33
commit 7408cc00f9
5 changed files with 4 additions and 7 deletions

View File

@@ -6,12 +6,6 @@ class ProductTemplate(models.Model):
is_manual_processing = fields.Boolean(string='人工线下加工')
is_customer_provided = fields.Boolean(string='客供料')
def product_create(self, product_id, item, order_id, order_number, i):
product_id = super(ProductTemplate, self).product_create(product_id, item, order_id, order_number, i)
product_id.product_tmpl_id.is_customer_provided = True if item['embryo_redundancy_id'] else False
return product_id
def copy_template(self, product_template_id):
if not isinstance(product_template_id, ProductTemplate):
raise ValueError('%s必须是ProductTemplate类型' % product_template_id)