增加坯料冗余量

This commit is contained in:
胡尧
2024-11-18 15:00:05 +08:00
parent 73aa4af118
commit 08a682143f
8 changed files with 40 additions and 21 deletions

View File

@@ -34,6 +34,9 @@ class JikimoSaleRoutePicking(Sf_Bf_Connect):
if kw.get('logistics_way'):
order_id.logistics_way = kw['logistics_way']
for item in bfm_process_order_list:
if item.get('embryo_redundancy_id'):
item['embryo_redundancy'] = request.env['sf.embryo.redundancy'].sudo().search([('code', '=', item['embryo_redundancy_id'])], limit=1)
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)
order_id.with_user(request.env.ref("base.user_admin")).sale_order_create_line(product, item)