跳至內容
選單
此問題已被標幟
1 回覆
3862 瀏覽次數

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).

頭像
捨棄
最佳答案
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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
11月 21
6432
1
2月 16
4039
2
7月 24
1653
1
5月 23
7969
1
9月 20
9378