diff options
| author | Christophe Monniez <moc@odoo.com> | 2018-08-30 13:41:14 +0200 |
|---|---|---|
| committer | Christophe Monniez <moc@odoo.com> | 2018-08-31 14:45:25 +0200 |
| commit | 4e7fcf3e07619145d8460217b91e85709db1500d (patch) | |
| tree | ea93dfd710be49b6755a35eec00d4738b525191c /addons/web/static/src/js | |
| parent | de1631c7174de31542fc38e29dd64dd092230995 (diff) | |
[FIX] web: wait web client to be ready before clickEverywhere test
When starting the clickEverywhere test with enterprise modules
installed, it happens that Odoo web client is not yet fully loaded.
In this situation, the test does not find any app to test.
With this commit, an attribute is added to odoo to check if the web
client is fully loaded.
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/chrome/abstract_web_client.js | 3 |
1 files changed, 3 insertions, 0 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 2ada433fbc8..7a8b3ce8b01 100644 --- a/addons/web/static/src/js/chrome/abstract_web_client.js +++ b/addons/web/static/src/js/chrome/abstract_web_client.js @@ -88,6 +88,8 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi set_title_part: '_onSetTitlePart', }, init: function (parent) { + // a flag to determine that odoo is fully loaded + odoo.isReady = false; this.client_options = {}; this._super(parent); ServiceProviderMixin.init.call(this); @@ -129,6 +131,7 @@ 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; }); }, |
