Skip to Content
Menu
This question has been flagged
1 Atsakyti
3831 Rodiniai

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).

Portretas
Atmesti
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.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
lapkr. 21
6356
1
vas. 16
4012
2
liep. 24
1619
1
geg. 23
7934
1
rugs. 20
9348