I want to create an order using odoo-xml-rpc using node js. Write now i created order first and then I am creating the order item as mentioned in the following url :- https://stackoverflow.com/a/40595869/363661 .
odoo.execute_kw('pos.order', 'create', params, function (err, value) { //first creating order
if (err) { return console.log(err); }
console.log(value)
var inParams = [];
inParams.push({
'order_id' : value //passing previous executed order_id to order item
})
var params = [];
params.push(inParams);
odoo.execute_kw('pos.order.line', 'create', params, function (err, value) { // then create order item with that order id
if (err) { return console.log(err); }
res.send('order item created')
});
});
The logic here is first we create an order and pass that order id to the line item creating api. But the problem here is "amount_total" is mandatory when creating order and after attaching order id to order item the order amount is not updating . How can we manage order subtotal using api? ( I am using nodejs xml-rpc)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
4035
Lượt xem
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
0
thg 5 22
|
2261 | ||
External API calls from Odoo
Đã xử lý
|
|
3
thg 1 24
|
13008 | |
|
1
thg 6 23
|
7623 | ||
|
3
thg 9 22
|
30645 | ||
|
1
thg 3 21
|
5834 |