تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
21060 أدوات العرض

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?

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يونيو 18
4323
0
ديسمبر 20
2295
2
يناير 23
5283
0
فبراير 21
3424
1
مايو 20
4145