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
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
4056
Tampilan
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Mei 22
|
2266 | ||
External API calls from Odoo
Diselesaikan
|
|
3
Jan 24
|
13010 | |
|
1
Jun 23
|
7624 | ||
|
3
Sep 22
|
30656 | ||
|
1
Mar 21
|
5841 |