Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
3839 Visualizações

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
Cancelar
Melhor resposta
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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
nov. 21
6369
1
fev. 16
4023
2
jul. 24
1624
1
mai. 23
7938
1
set. 20
9348