From 6b3b9556fc704bad1f88d3afd381c34bbfeb7225 Mon Sep 17 00:00:00 2001 From: Nicolas Galler Date: Tue, 3 Nov 2020 08:30:16 +0000 Subject: [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) Signed-off-by: Nicolas Martinelli (nim) --- addons/web/static/src/js/tools/debug_manager_backend.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/tools/debug_manager_backend.js') 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({ -- cgit v1.2.3