坯料新增路线

This commit is contained in:
jinling.yang
2024-05-14 10:51:38 +08:00
parent ed9b575fb5
commit 934b59d213
9 changed files with 56 additions and 39 deletions

View File

@@ -52,7 +52,7 @@ class Sf_Bf_Connect(http.Controller):
self_machining_embryo = request.env['product.template'].sudo().no_bom_product_create(
self_machining_id,
item,
order_id, 'self_machining', i)
order_id, 'self_machining', i, product)
# 创建坯料的bom
self_machining_bom = request.env['mrp.bom'].with_user(
request.env.ref("base.user_admin")).bom_create(
@@ -78,7 +78,7 @@ class Sf_Bf_Connect(http.Controller):
item,
order_id,
'subcontract',
i)
i, product)
if outsource_embryo == -3:
res['status'] = -3
res['message'] = '该订单模型的材料型号在您分配的工厂里暂未设置获取方式和供应商,请先配置再进行分配'
@@ -105,7 +105,8 @@ class Sf_Bf_Connect(http.Controller):
purchase_embryo = request.env['product.template'].sudo().no_bom_product_create(purchase_id,
item,
order_id,
'purchase', i)
'purchase', i,
product)
if purchase_embryo == -3:
res['status'] = -3
res['message'] = '该订单模型的材料型号在您分配的工厂里暂未设置获取方式和供应商,请先配置再进行分配'