Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
7256 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 22
8625
3
มิ.ย. 20
4039
0
มี.ค. 19
3776
0
ม.ค. 17
2372
0
เม.ย. 24
870