Skip to Content
Menú
This question has been flagged
1 Respondre
3674 Vistes

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
Best Answer
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
Related Posts Respostes Vistes Activitat
1
de nov. 21
6131
1
de febr. 16
3862
2
de jul. 24
1459
1
de maig 23
7785
1
de set. 20
9233