Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
21053 Ansichten

My code:

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

Thanks, i will try.

Beste Antwort

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
Verwerfen

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

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juni 18
4319
0
Dez. 20
2294
2
Jan. 23
5279
0
Feb. 21
3422
1
Mai 20
4138