summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Galler <ngl@odoo.com>2020-11-03 08:30:16 +0000
committerNicolas Galler <ngl@odoo.com>2020-11-06 15:23:13 +0000
commit6b3b9556fc704bad1f88d3afd381c34bbfeb7225 (patch)
tree6447894f7f479d3df1a753ac643ed76cf37499d0
parente7c90f18b2e4504a0db45fbd79e298993214e060 (diff)
[IMP] web: extract logic to update debug manager action
Small refactoring to allow calling the method to update the debug manager action independently from `current_action_updated`. Needed for 3d80ff9998dd402ac48d280e5d6b81aaf91b6180. opw-2365539 closes odoo/odoo#61489 X-original-commit: c4e1cfc527cf65fdad201b77e54bf7027b8dd6c2 Related: odoo/enterprise#14634 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
-rw-r--r--addons/web/static/src/js/tools/debug_manager_backend.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/tools/debug_manager_backend.js b/addons/web/static/src/js/tools/debug_manager_backend.js
index b9f211872eb..2dd8fc0df36 100644
--- a/addons/web/static/src/js/tools/debug_manager_backend.js
+++ b/addons/web/static/src/js/tools/debug_manager_backend.js
@@ -728,11 +728,14 @@ if (config.isDebug()) {
*/
current_action_updated: function (action, controller) {
this._super.apply(this, arguments);
+ this.update_debug_manager(action, controller);
+ },
+ update_debug_manager: function(action, controller) {
var debugManager = _.find(this.menu.systray_menu.widgets, function(item) {
return item instanceof DebugManager;
});
debugManager.update('action', action, controller && controller.widget);
- },
+ }
});
ActionManager.include({