Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
21080 Visninger

My code:

 var res = rpc.query({
            model: 'my model',
            method: 'read',
            args: [????]
        }).then(function (data) {
            console.log(data); });
        };
Avatar
Kassér
Forfatter

Thanks, i will try.

Bedste svar

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
Kassér

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

Related Posts Besvarelser Visninger Aktivitet
1
jun. 18
4329
0
dec. 20
2297
2
jan. 23
5298
0
feb. 21
3428
1
maj 20
4161