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
Этот вопрос был отмечен
4043
Представления
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 |