Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
21344 Widoki

My code:

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

Thanks, i will try.

Najlepsza odpowiedź

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);
});
Awatar
Odrzuć

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

Powiązane posty Odpowiedzi Widoki Czynność
1
cze 18
4524
0
gru 20
2381
2
sty 23
5467
0
lut 21
3593
1
maj 20
4342