Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4361 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
7221
1
feb 16
4499
2
lug 24
2141
1
mag 23
8617
1
set 20
9952