diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-16 19:50:50 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-16 19:50:50 +0200 |
| commit | 74033eb007749c88b84ea883b006a5877355306e (patch) | |
| tree | 8f8b6cb22cc2bf6046ba04e388ea29855a33c597 /addons/web/static/src/js/chrome/action_manager.js | |
| parent | 71cdefd9f41881d9720433d5fc7732759098f9a4 (diff) | |
| parent | 90f8f17fb4fc795c2c12d68d21900e81f3d7a223 (diff) | |
[MERGE] forward port branch saas-11.2 up to 90f8f17fb4f
Diffstat (limited to 'addons/web/static/src/js/chrome/action_manager.js')
| -rw-r--r-- | addons/web/static/src/js/chrome/action_manager.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js index b97262079ef..b36e1b8eec9 100644 --- a/addons/web/static/src/js/chrome/action_manager.js +++ b/addons/web/static/src/js/chrome/action_manager.js @@ -839,12 +839,27 @@ var ActionManager = Widget.extend({ * is ready when it will be appended to the DOM. This allows to prevent * flickering for widgets doing async stuff in willStart() or start(). * + * Also updates the control panel on any change of the title on controller's + * widget. + * * @private * @param {Object} controller * @returns {Deferred<Object>} resolved with the controller when it is ready */ _startController: function (controller) { + var self = this; var fragment = document.createDocumentFragment(); + // AAB: change this logic to stop using the properties mixin + controller.widget.on("change:title", this, function () { + if (self.getCurrentController() !== controller) { + return; + } + var action = self.actions[controller.actionID]; + if (!action.flags || !action.flags.headless) { + var breadcrumbs = self._getBreadcrumbs(); + self.controlPanel.update({breadcrumbs: breadcrumbs}, {clear: false}); + } + }); return controller.widget.appendTo(fragment).then(function () { return controller; }); |
