Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3994 Visualizzazioni

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
Abbandona
Risposta migliore
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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
nov 21
6669
1
feb 16
4190
2
lug 24
1776
1
mag 23
8115
1
set 20
9497