diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-12-18 17:50:33 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-12-18 17:50:33 +0100 |
| commit | 07f2a7c1f977ce090f5d6cc5b7a52779b6036536 (patch) | |
| tree | 42a65128fe91c2b419e0658479ce07fe079d86e6 /addons/web/static/src | |
| parent | 79f716c70f5f17b5d44914f8de7cd717b0c8fd82 (diff) | |
| parent | cb0074ab15efd5e98ca0472ec66a8a89fef42719 (diff) | |
[MERGE] forward port of latest saas-2 until rev 3893 dle@openerp.com-20131218112416-2vtaq442qo8opq4u
bzr revid: mat@openerp.com-20131218165033-4djghawrzllkeckg
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/chrome.js | 2 | ||||
| -rw-r--r-- | addons/web/static/src/js/openerpframework.js | 2 | ||||
| -rw-r--r-- | addons/web/static/src/js/views.js | 24 |
3 files changed, 14 insertions, 14 deletions
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 || {}); |
