From f55e4a5e1499dfc7ab134e0e8e769310a8c60898 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 27 Jun 2014 13:03:52 +0200 Subject: [FIX] web: no switch_mode trigger if not switched The switch mode event was triggered even if the view was not actually switched This leaded to inconsistencies, like adding the view in the breadcrumb history, while the switch did not happen --- addons/web/static/src/js/views.js | 1 - 1 file changed, 1 deletion(-) (limited to 'addons/web/static/src/js/views.js') diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 24c3d6097bb..df02686f8e5 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -579,7 +579,6 @@ instance.web.ViewManager = instance.web.Widget.extend({ var view_promise; var form = this.views['form']; if (!view || (form && form.controller && !form.controller.can_be_discarded())) { - self.trigger('switch_mode', view_type, no_store, view_options); return $.Deferred().reject(); } if (!no_store) { -- cgit v1.2.3