Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda

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
Buang
Jawaban Terbai
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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Nov 21
6200
1
Feb 16
3893
2
Jul 24
1513
1
Mei 23
7829
1
Sep 20
9283