コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7545 ビュー

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')
});
});
    
})
アバター
破棄
最善の回答

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.

アバター
破棄
関連投稿 返信 ビュー 活動
1
5月 22
8987
3
6月 20
4318
0
3月 19
3973
0
1月 17
2554
0
4月 24
1077