diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 91d7aafe775..5bb51af7540 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -471,8 +471,13 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner }, on_mode_switch: function (view_type, no_store) { var self = this; + var switched = $.when(this._super(view_type, no_store)).then(function () { + self.$element.find('.oe-view-manager-logs:first') + .addClass('oe-folded').removeClass('oe-has-more') + .find('ul').empty(); + }); return $.when( - this._super(view_type, no_store), + switched, this.shortcut_check(this.views[view_type]) ).then(function() { var controller = self.views[self.active_view].controller,