Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
21043 Представления

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
4316
0
дек. 20
2294
2
янв. 23
5277
0
февр. 21
3418
1
мая 20
4134