diff options
| author | qsm-odoo <qsm@odoo.com> | 2019-07-23 14:01:14 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-08-06 11:09:43 +0000 |
| commit | e5235747c5ede2d206d732100283d005a0228740 (patch) | |
| tree | 53189ab1212da21072d4b982c5a4a247dcfbbd74 /addons/web/static/src/js/public | |
| parent | 29db04e8aff841daafc9821871d9c24c8472994d (diff) | |
[FIX] web, website: start public widgets after all lazy loadings
Bug introduced with
https://github.com/odoo/odoo/commit/1f5c9e363b6f7cb9a2770e6247536803fd13e3f0
Before this commit, the public/website root was started as soon as
the bundle it is in was lazy loaded. It then started all the registered
public widgets. The problem was that some of those may be registered
by other lazy-loaded bundles. The public root would then not start
those if those bundles were lazy-loaded with a too long delay.
This commit fixes the bug by starting the public/website root once all
known bundles are fully lazy-loaded.
closes odoo/odoo#35118
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/public')
| -rw-r--r-- | addons/web/static/src/js/public/public_root_instance.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/addons/web/static/src/js/public/public_root_instance.js b/addons/web/static/src/js/public/public_root_instance.js index 8202e011cc3..988d939bbe1 100644 --- a/addons/web/static/src/js/public/public_root_instance.js +++ b/addons/web/static/src/js/public/public_root_instance.js @@ -1,7 +1,7 @@ odoo.define('root.widget', function (require) { 'use strict'; -require('web.dom_ready'); +var lazyloader = require('web.public.lazyloader'); var rootData = require('web.public.root'); /** @@ -11,7 +11,10 @@ var rootData = require('web.public.root'); * been consumed. */ var publicRoot = new rootData.PublicRoot(null); -return publicRoot.attachTo(document.body).then(function () { - return publicRoot; +return lazyloader.allScriptsLoaded.then(function () { + return publicRoot.attachTo(document.body).then(function () { + return publicRoot; + }); }); + }); |
