Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
21038 Переглядів

My code:

 var res = rpc.query({
            model: 'my model',
            method: 'read',
            args: [????]
        }).then(function (data) {
            console.log(data); });
        };
Аватар
Відмінити
Автор

Thanks, i will try.

Найкраща відповідь

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);
});
Аватар
Відмінити

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

Related Posts Відповіді Переглядів Дія
1
черв. 18
4310
0
груд. 20
2294
2
січ. 23
5277
0
лют. 21
3414
1
трав. 20
4130