Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
21040 Weergaven

My code:

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

Thanks, i will try.

Beste antwoord

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
Annuleer

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

Gerelateerde posts Antwoorden Weergaven Activiteit
1
jun. 18
4315
0
dec. 20
2294
2
jan. 23
5277
0
feb. 21
3414
1
mei 20
4131