Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
21042 Visualizzazioni

My code:

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

Thanks, i will try.

Risposta migliore

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
Abbandona

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

Post correlati Risposte Visualizzazioni Attività
1
giu 18
4316
0
dic 20
2294
2
gen 23
5277
0
feb 21
3417
1
mag 20
4134