[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
This commit is contained in:
Denis Ledoux 2014-06-27 13:03:52 +02:00
parent 55b121ae9f
commit f55e4a5e14
1 changed files with 0 additions and 1 deletions

View File

@ -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) {