From 06770f53bf91ce3fef635ce5103f4c72259ceb7c Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Tue, 28 Jun 2016 14:19:47 +0200 Subject: [PATCH] [FIX] web: allow `on_(attach|detach)_callback` callbacks to be called The `on_attach_callback` and `on_detach_callback` callbacks are called when an a widget is attached / detached according to the `is_in_DOM` variable. As the community's action manager cannot be detached from the DOM, we can hardcode this value to true. This allow to run these callbacks when needed. --- addons/web/static/src/js/web_client.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/web/static/src/js/web_client.js b/addons/web/static/src/js/web_client.js index 570e64ac2bd..99237dccc6c 100644 --- a/addons/web/static/src/js/web_client.js +++ b/addons/web/static/src/js/web_client.js @@ -24,6 +24,10 @@ return AbstractWebClient.extend({ }, show_application: function() { var self = this; + + // Allow to call `on_attach_callback` and `on_detach_callback` when needed + this.action_manager.is_in_DOM = true; + this.toggle_bars(true); this.set_title(); this.update_logo();