From 92f31b10e43ad6c265a223ae22cb3c3a0feb0c8a Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Thu, 18 Aug 2016 11:00:02 +0200 Subject: [PATCH] [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. --- addons/website/static/src/js/website.editor.js | 7 ++----- addons/website/static/src/js/website.seo.js | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index b62b6c2e6ac..42bebea65ba 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -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(); }); diff --git a/addons/website/static/src/js/website.seo.js b/addons/website/static/src/js/website.seo.js index 528c25afa56..4b5acc8090a 100644 --- a/addons/website/static/src/js/website.seo.js +++ b/addons/website/static/src/js/website.seo.js @@ -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,