İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3860 Görünümler

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
Vazgeç
En İyi Yanıt
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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Kas 21
6427
1
Şub 16
4039
2
Tem 24
1651
1
May 23
7964
1
Eyl 20
9377