Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
21071 Prikazi

My code:

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

Thanks, i will try.

Best Answer

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
Opusti

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

Related Posts Odgovori Prikazi Aktivnost
1
jun. 18
4326
0
dec. 20
2295
2
jan. 23
5293
0
feb. 21
3425
1
maj 20
4152