My code:
var res = rpc.query({
model: 'my model',
method: 'read',
args: [????]
}).then(function (data) {
console.log(data); });
};Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
My code:
var res = rpc.query({
model: 'my model',
method: 'read',
args: [????]
}).then(function (data) {
console.log(data); });
};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
6월 18
|
4990 | ||
|
|
0
12월 20
|
2631 | ||
|
|
2
1월 23
|
6219 | ||
|
|
0
2월 21
|
3975 | ||
|
|
1
5월 20
|
4835 |
Thanks, i will try.