[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#61491 X-original-commit: c4e1cfc527cf65fdad201b77e54bf7027b8dd6c2 Related: odoo/enterprise#14639 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user