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

My code:

 var res = rpc.query({
            model: 'my model',
            method: 'read',
            args: [????]
        }).then(function (data) {
            console.log(data); });
        };
Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks, i will try.

Câu trả lời hay nhất

Hi @Pavel

You could do it like this:

var model = 'res.partner';
// Use an empty array to search for all the records
var domain = [];
// Use an empty array to read all the fields of the records
var fields = [];
rpc.query({
model: model,
method: 'search_read',
args: [domain, fields],
}).then(function (data) {
console.log(data);
});
Ảnh đại diện
Huỷ bỏ

Hi, is the domain the id of the record from model?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 18
4397
0
thg 12 20
2332
2
thg 1 23
5334
0
thg 2 21
3505
1
thg 5 20
4229