diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index abbd4767361..31293dab1a6 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -256,7 +256,7 @@ instance.web.CrashManager = instance.web.Class.extend({ new (handler)(this, error).display(); return; } - if (error.data.name === "openerp.addons.web.session SessionExpiredException") { + if (error.data.name === "openerp.http.SessionExpiredException") { this.show_warning({type: "Session Expired", data: { message: _t("Your OpenERP session expired. Please refresh the current web page.") }}); return; } diff --git a/addons/web/static/src/js/openerpframework.js b/addons/web/static/src/js/openerpframework.js index 4c114e28fe8..22ca70ebbf7 100644 --- a/addons/web/static/src/js/openerpframework.js +++ b/addons/web/static/src/js/openerpframework.js @@ -1155,7 +1155,7 @@ openerp.Model = openerp.Class.extend({ kwargs = args; args = []; } - var call_kw = _.str.sprintf('/web/dataset/call_kw/%s/%s', this.name, method); + var call_kw = '/web/dataset/call_kw/' + this.name + '/' + method; return this.session().rpc(call_kw, { model: this.name, method: method, diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 37369377bf1..25a424394bb 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -1386,25 +1386,25 @@ instance.web.View = instance.web.Widget.extend({ return self.getParent().on_action_executed.apply(null, arguments); } }; - var context = dataset.get_context(); - if (action_data.model !== dataset.model) { - // filter out context keys that are specific to the action model. - // Wrong default_ and search_default values will no give the expected views - // Wrong group_by values will simply fail and forbid rendering of the destination view - context = _.object(_.reject(_.pairs(context.eval()), function(pair) { - return pair[0].match('^(?:(?:default_|search_default_).+|group_by|group_by_no_leaf)$') !== null; - })); - } + var context = new instance.web.CompoundContext(dataset.get_context(), action_data.context || {}); - context = new instance.web.CompoundContext(context, action_data.context || {}); + // response handler var handler = function (action) { if (action && action.constructor == Object) { - var ncontext = new instance.web.CompoundContext(context); + // filter out context keys that are specific to the current action. + // Wrong default_* and search_default_* values will no give the expected result + // Wrong group_by values will simply fail and forbid rendering of the destination view + var ncontext = new instance.web.CompoundContext( + _.object(_.reject(_.pairs(dataset.get_context().eval()), function(pair) { + return pair[0].match('^(?:(?:default_|search_default_).+|group_by|group_by_no_leaf|active_id|active_ids)$') !== null; + })) + ); + ncontext.add(action_data.context || {}); + ncontext.add({active_model: dataset.model}); if (record_id) { ncontext.add({ active_id: record_id, active_ids: [record_id], - active_model: dataset.model }); } ncontext.add(action.context || {}); diff --git a/addons/web_kanban_gauge/__openerp__.py b/addons/web_kanban_gauge/__openerp__.py index fd4c2cfba66..7eb2ba81dad 100644 --- a/addons/web_kanban_gauge/__openerp__.py +++ b/addons/web_kanban_gauge/__openerp__.py @@ -14,5 +14,5 @@ This widget allows to display gauges using justgage library. ], 'qweb': [ ], - 'auto_install': False, + 'auto_install': True, }