From 6f8cabe41333d73fd3a8ac84288455c45b80952b Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Wed, 29 Jul 2015 09:13:33 +0200 Subject: [PATCH] [FIX] web: view_manager: update control panel on title change only if the control panel if visible. This fixes a bug on the settings view (form view), on which the control panel is hidden (the bar containing 'Apply' and 'Cancel' is unfortunately not a true control panel). When clicking on 'Apply', for some weird reason, the event 'change:title' is triggered and the control panel is updated with the new title ('New'). However, as the flags hidden isn't mentionned, the control panel visibility is toggled. --- addons/web/static/src/js/view_manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_manager.js b/addons/web/static/src/js/view_manager.js index 86be40f78ec..621fd663313 100644 --- a/addons/web/static/src/js/view_manager.js +++ b/addons/web/static/src/js/view_manager.js @@ -218,7 +218,7 @@ var ViewManager = Widget.extend(ControlPanelMixin, { if (self.action_manager) self.action_manager.trigger('history_back'); }); controller.on("change:title", this, function() { - if (self.action_manager) { + if (self.action_manager && !self.flags.headless) { var breadcrumbs = self.action_manager.get_breadcrumbs(); self.update_control_panel({breadcrumbs: breadcrumbs}, {clear: false}); }