处理订单客供料的问题
This commit is contained in:
@@ -39,6 +39,7 @@ class JikimoSaleRoutePicking(Sf_Bf_Connect):
|
||||
item['embryo_redundancy_id'] = item['embryo_redundancy'].id
|
||||
product = request.env['product.template'].sudo().product_create(product_id, item, order_id,
|
||||
kw['order_number'], i)
|
||||
product.product_tmpl_id.is_customer_provided = True if item['embryo_redundancy_id'] else False
|
||||
order_id.with_user(request.env.ref("base.user_admin")).sale_order_create_line(product, item)
|
||||
i += 1
|
||||
res['factory_order_no'] = order_id.name
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user