Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
7142 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
may 22
8512
3
jun 20
3819
0
mar 19
3628
0
ene 17
2256
0
abr 24
750