处理订单客供料的问题

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

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