Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
21059 Visualizações

My code:

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

Thanks, i will try.

Melhor resposta

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
Cancelar

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

Publicações relacionadas Respostas Visualizações Atividade
1
jun. 18
4323
0
dez. 20
2295
2
jan. 23
5282
0
fev. 21
3424
1
mai. 20
4145