summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorVincent Schippefilt <vsc@odoo.com>2019-12-11 14:12:35 +0000
committerVincent Schippefilt <vsc@odoo.com>2019-12-11 14:37:04 +0000
commit0f2a500f0e74f7e60d806217296752ee69791d4d (patch)
tree189e0e127633e74d01e1852e8b5d2760eceadff8 /addons/web/static/src/js
parent74dcb64f4678086062d62b597ba290df23a280f5 (diff)
[FIX] web: fix click_all test
Before this commit, after the introduction of OWL, for some reason, maybe because the session is ready earlier or later, the webclient is opening the first app sightly earlier than before, making it too early. The click_all failed actually because, in the initialization of the webclient, it does a read on read user, protected by a drop_previous it tries to start the first applictaion, when this happens, the hash changes ==> because the hash changes, it tries to open an application, with is also protected by the same drop previous, this discarding the result of the read and preventing the then callbacks of the read to happen. After this commit, we are declaring that the client is ready after the actual load of an application. closes odoo/odoo#41695 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/chrome/abstract_web_client.js1
-rw-r--r--addons/web/static/src/js/chrome/action_manager.js3
2 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js
index 7f07531dae2..8980f962267 100644
--- a/addons/web/static/src/js/chrome/abstract_web_client.js
+++ b/addons/web/static/src/js/chrome/abstract_web_client.js
@@ -154,7 +154,6 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi
// Listen to 'scroll' event and propagate it on main bus
self.action_manager.$el.on('scroll', core.bus.trigger.bind(core.bus, 'scroll'));
core.bus.trigger('web_client_ready');
- odoo.isReady = true;
if (session.uid === 1) {
self.$el.addClass('o_is_superuser');
}
diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js
index 5c0ee9260e0..ee108c94326 100644
--- a/addons/web/static/src/js/chrome/action_manager.js
+++ b/addons/web/static/src/js/chrome/action_manager.js
@@ -170,6 +170,9 @@ var ActionManager = Widget.extend({
return action;
});
+ }).then(function(action) {
+ odoo.isReady = true;
+ return action;
});
},
/**