İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
21039 Görünümler

My code:

 var res = rpc.query({
            model: 'my model',
            method: 'read',
            args: [????]
        }).then(function (data) {
            console.log(data); });
        };
Avatar
Vazgeç
Üretici

Thanks, i will try.

En İyi Yanı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);
});
Avatar
Vazgeç

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Haz 18
4315
0
Ara 20
2294
2
Oca 23
5277
0
Şub 21
3414
1
May 20
4131