summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-07-20 11:48:49 +0200
committerChristophe Simonis <chs@odoo.com>2017-07-20 11:48:49 +0200
commitfa3e89064a503c95ab2b283e5d5b39ca182f8f47 (patch)
treed638f0cb99fc973169d670ff0bafd1b9474b4771 /addons/web/static/src/js/chrome
parent0ae679e433ee4c5ca32ae1302d87d7fb33e0c78d (diff)
parent104dfe3c07d36a6487f045f31d0999cc429cb5bb (diff)
[MERGE] forward port branch saas-16 up to 104dfe3c07d
Diffstat (limited to 'addons/web/static/src/js/chrome')
-rw-r--r--addons/web/static/src/js/chrome/view_manager.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web/static/src/js/chrome/view_manager.js b/addons/web/static/src/js/chrome/view_manager.js
index 9b431d3e57a..a4a1d65f7b6 100644
--- a/addons/web/static/src/js/chrome/view_manager.js
+++ b/addons/web/static/src/js/chrome/view_manager.js
@@ -53,7 +53,8 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
*/
on_attach_callback: function() {
this.is_in_DOM = true;
- if (this.active_view && this.active_view.controller.on_attach_callback) {
+ var controller = this.active_view && this.active_view.controller;
+ if (controller && this.active_view.controller.on_attach_callback) {
this.active_view.controller.on_attach_callback();
}
},
@@ -579,10 +580,11 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
// 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 Context(
- _.object(_.reject(_.pairs(_.extend({}, action_data.context, self.env.context)), function(pair) {
+ _.object(_.reject(_.pairs(self.env.context), function(pair) {
return pair[0].match('^(?:(?:default_|search_default_|show_).+|.+_view_ref|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
}))
);
+ ncontext.add(action_data.context || {});
ncontext.add({active_model: self.env.modelName});
if (res_ids) {
ncontext.add({