diff options
| author | Christophe Simonis <chs@openerp.com> | 2014-04-07 18:17:28 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2014-04-07 18:17:28 +0200 |
| commit | f1d3f2a0c42f1de5970b5f897c4e5b279d1ee23b (patch) | |
| tree | 9d5f632e397b7cfcc3bb472cbda371b481558baf /addons/web/static/src/js/views.js | |
| parent | 0161666e8b6e91da575a96be005cb5f84c64e9cb (diff) | |
| parent | ffae3807255269ff290bdf9fe62bc668feaade75 (diff) | |
[MERGE] forward port of branch saas-3 up to revid 3995 chs@openerp.com-20140407144625-jfimvsx4mgrkztqv
bzr revid: chs@openerp.com-20140407161728-ccudwnqo970ac8ay
Diffstat (limited to 'addons/web/static/src/js/views.js')
| -rw-r--r-- | addons/web/static/src/js/views.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index c9229c3c70a..2f401445f7e 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -25,9 +25,9 @@ instance.web.ActionManager = instance.web.Widget.extend({ 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; }, @@ -408,7 +408,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ 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, }); @@ -426,7 +426,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ 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); @@ -639,7 +639,7 @@ instance.web.ViewManager = instance.web.Widget.extend({ 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; @@ -1402,7 +1402,7 @@ instance.web.View = instance.web.Widget.extend({ // 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 || {}); |
