Skip to Content
Menú
This question has been flagged
1 Respondre
21046 Vistes

My code:

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

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
Descartar

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

Related Posts Respostes Vistes Activitat
1
de juny 18
4316
0
de des. 20
2294
2
de gen. 23
5277
0
de febr. 21
3418
1
de maig 20
4134