My code:
var res = rpc.query({
model: 'my model',
method: 'read',
args: [????]
}).then(function (data) {
console.log(data); });
};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
|
6284 | |||
|
0
12月 20
|
3480 | |||
|
2
1月 23
|
7809 | |||
|
0
2月 21
|
5446 | |||
|
1
5月 20
|
6343 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Thanks, i will try.