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

My code:

 var res = rpc.query({
            model: 'my model',
            method: 'read',
            args: [????]
        }).then(function (data) {
            console.log(data); });
        };
頭像
捨棄
作者

Thanks, i will try.

最佳答案

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);
});
頭像
捨棄

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

相關帖文 回覆 瀏覽次數 活動
1
6月 18
4327
0
12月 20
2295
2
1月 23
5294
0
2月 21
3425
1
5月 20
4154