Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
20938 Vistas

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.

Mejor respuesta

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?

Publicaciones relacionadas Respuestas Vistas Actividad
1
jun 18
4212
0
dic 20
2253
2
ene 23
5170
0
feb 21
3340
1
may 20
3989