生成bom
This commit is contained in:
@@ -30,6 +30,8 @@ class Sf_Bf_Connect(http.Controller):
|
||||
product = request.env['product.template'].sudo().product_create(product_id, item, order_id,
|
||||
ret['order_number'], i)
|
||||
order_id.with_user(request.env.ref("base.user_admin")).sale_order_create_line(product, item)
|
||||
bom = request.env['mrp.bom'].sudo().bom_create(product)
|
||||
bom.sudo().bom_create_Line(product)
|
||||
i += 1
|
||||
res['factory_order_no'] = order_id.name
|
||||
return json.JSONEncoder().encode(res)
|
||||
|
||||
Reference in New Issue
Block a user