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
- Бухоблік
- Склад
- PoS
- Project
- MRP
Це запитання позначене
4044
Переглядів
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
РеєстраціяRelated Posts | Відповіді | Переглядів | Дія | |
---|---|---|---|---|
|
0
трав. 22
|
2262 | ||
External API calls from Odoo
Вирішено
|
|
3
січ. 24
|
13009 | |
|
1
черв. 23
|
7624 | ||
|
3
вер. 22
|
30647 | ||
|
1
бер. 21
|
5836 |