Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
21086 Zobrazení

My code:

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

Thanks, i will try.

Nejlepší odpověď

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
Zrušit

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

Related Posts Odpovědi Zobrazení Aktivita
1
čvn 18
4334
0
pro 20
2297
2
led 23
5300
0
úno 21
3429
1
kvě 20
4162