Skip to Content
Menu
This question has been flagged
1 Odpoveď
4337 Zobrazenia

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
Zrušiť
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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
nov 21
7179
1
feb 16
4483
2
júl 24
2128
1
máj 23
8599
1
sep 20
9940