[FIX] website: pass ids as a positional argument

For the sake of simplicity, the method adapter `call_kw_multi` does not look up
for `ids` in keyword arguments, instead it expects it in positional arguments.
This commit is contained in:
Raphael Collet
2016-08-31 17:21:57 +02:00
parent b58beee468
commit 92f31b10e4
2 changed files with 4 additions and 10 deletions
@@ -95,11 +95,8 @@ website.TopBarCustomize = Widget.extend({
return ajax.jsonRpc('/web/dataset/call_kw', 'call', {
model: 'ir.ui.view',
method: 'toggle',
args: [],
kwargs: {
ids: [parseInt(view_id, 10)],
context: base.get_context(),
}
args: [[parseInt(view_id, 10)]],
kwargs: {context: base.get_context()}
}).then(function () {
window.location.reload();
});
+2 -5
View File
@@ -402,11 +402,8 @@ var Configurator = Dialog.extend({
ajax.jsonRpc('/web/dataset/call_kw', 'call', {
model: 'website',
method: 'get_languages',
args: [],
kwargs: {
ids: [base.get_context().website_id],
context: base.get_context()
}
args: [[base.get_context().website_id]],
kwargs: {context: base.get_context()}
}).then( function (data) {
self.$('#language-box').html(core.qweb.render('Configurator.language_promote', {
'language': data,