this._super.apply(this, arguments);
this.$el.on('click', 'a.oe_breadcrumb_item', this.on_breadcrumb_clicked);
},
- dialog_stop: function () {
+ dialog_stop: function (reason) {
if (this.dialog) {
- this.dialog.destroy();
+ this.dialog.destroy(reason);
}
this.dialog = null;
},
if (this.dialog_widget && !this.dialog_widget.isDestroyed()) {
this.dialog_widget.destroy();
}
- this.dialog_stop();
+ this.dialog_stop(executor.action);
this.dialog = new instance.web.Dialog(this, {
dialogClass: executor.klass,
});
this.dialog.open();
return initialized;
} else {
- this.dialog_stop();
+ this.dialog_stop(executor.action);
this.inner_action = executor.action;
this.inner_widget = widget;
executor.post_process(widget);
this.$el
.find('.oe_view_manager_switch a').filter('[data-view-type="' + view_type + '"]')
.parent().addClass('active');
-
+ this.$el.attr("data-view-type", view_type);
return $.when(view_promise).done(function () {
_.each(_.keys(self.views), function(view_name) {
var controller = self.views[view_name].controller;
// 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;
+ return pair[0].match('^(?:(?:default_|search_default_).+|.+_view_ref|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
}))
);
ncontext.add(action_data.context || {});