Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
21085 Vues

My code:

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

Thanks, i will try.

Meilleure réponse

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
Ignorer

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

Publications associées Réponses Vues Activité
1
juin 18
4334
0
déc. 20
2297
2
janv. 23
5300
0
févr. 21
3429
1
mai 20
4162