Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
21041 มุมมอง

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
4315
0
ธ.ค. 20
2294
2
ม.ค. 23
5277
0
ก.พ. 21
3417
1
พ.ค. 20
4133