コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
16209 ビュー

Hi, i work with odoo 13. I trying get all the rows, from my table. What should I pass in my arg, for get all the string at once?


My code:

 var res = rpc.query({
            model: 'my model',
            method: 'read',
            args: [????]
        }).then(function (data) {
            console.log(data); });
        };
アバター
破棄
最善の回答

the arg is empty wtih [] if the function has no params , if has params [value1,value2]

アバター
破棄
最善の回答

Hi,

You can use the below code to achieve it:

var domain = [];
var fields = [];
rpc.query({
model: my_model,
method: 'search_read',
args: [domain, fields],
}).then(function (data) {
console.log(data);
});

Regards

アバター
破棄
最善の回答

This is a duplicated question

See my answer at your other question at: https://www.odoo.com/es_ES/forum/ayuda-1/question/how-to-use-rpc-query-in-javascript-with-read-method-for-get-all-rows-from-table-173529


アバター
破棄
関連投稿 返信 ビュー 活動
0
6月 18
3356
1
6月 18
3964
0
3月 15
3763
0
9月 23
980
1
6月 23
3945