Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3859 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhấ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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 21
6425
1
thg 2 16
4039
2
thg 7 24
1650
1
thg 5 23
7964
1
thg 9 20
9377