Skip to Content
Menu
This question has been flagged

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
Discard
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
Discard
Related Posts Replies Views Activity
1
Nov 21
5875
1
Feb 16
3753
2
Jul 24
1186
1
May 23
7583
1
Sep 20
9065