Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
7620 Prikazi

How to create multiple order item using node js . I know how to create one order item at a time by using the following code:-

app.get('/api/order-item/create', (req, res) => {

    odoo.connect(function (err) {
if (err) { return console.log(err); }
console.log('Connected to Odoo server.');
var inParams = [];
inParams.push({
'product_id': 13,
'price_unit' :  800.4,
'qty' : 2,
'price_subtotal' : 1600.8,
'price_subtotal_incl' :1600.8
})
var params = [];
params.push(inParams);
odoo.execute_kw('pos.order.line', 'create', params, function (err, value) {
if (err) { return console.log(err); }
console.log(value);
res.send('order item created')
});
});
    
})
Avatar
Opusti
Best Answer

Which node module are you using?? i dont know how can i execute sql, for example i want to get data from 2 tables with an stored procedure or  a sql sentence.

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
maj 22
9101
3
jun. 20
4502
0
mar. 19
4032
0
jan. 17
2612
1
jul. 25
1351