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

In POS Session, when click on Validate button in mean time, I need to send order data for Javascript (RPC call) to python function. Tp performed some operations and then send back to JS.


Is the any piece of JS call to python function and get data back to JS method. (for V14).

Avatar
Descartar
Mejor respuesta
rpc.query({
model: 'product.product',
method: 'search_read',
args: [domain, ['id']],
kwargs: {
limit: 1,
}
}).then(function (products) {
if (products.length){
next(resolve, reject);
} else {
resolve();
}
});

Use rpc.query as above.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
nov 21
6137
1
feb 16
3864
2
jul 24
1462
1
may 23
7797
1
sept 20
9237