summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/public/public_root_instance.js
AgeCommit message (Collapse)Author
2020-07-13[IMP] web,*: do not deploy services in testsAaron Bohy
*mail,point_of_sale,web_editor,website In the tests, required services are deployed for each test independently. There is no need to have, in additon, all services deployed globally. Worse, it could conflict and lead to unexpected results. This commit ensures services are no longer deployed globally in tests. It turns the module 'web.env' into a declarative module with no side-effect, by moving the service deployment to main.js, which isn't added to the tests page. Task 2287397 closes odoo/odoo#53817 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-06-12[IMP] web,*: properly define env in the frontendAaron Bohy
*bus,mail This commit extracts the common basis of the env to use both in the frontend and the backend. The public env now contains most of the features that were previously (only) in the webclient env. Moreover, the PublicRoot no longer uses the ServiceProviderMixin, such that services are only deployed once, in the (public) env. Owl components can now be defined in the website, and rely on a properly built env. Legacy widgets still works as they access services through the PublicRoot (via trigger_up) which redirects those requests to the env.
2019-08-06[FIX] web, website: start public widgets after all lazy loadingsqsm-odoo
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>
2019-02-26[REF] website, web, *: move part of website into webqsm-odoo
* im_livechat, survey, website_forum When website is installed, the JavaScript code has access to utilities to define improved widgets which are automatically attached to existing DOM elements on page load. Those mechanics are more and more needed in portal which does not depend on website (as it is website which depends on portal). This commit moves part of website JS to web, so that it can be used by all 'frontend' apps whose only common dependency is web (portal, survey, auth_signup, ...). This PR also questioned several other similar issues which will be handled later like: - website should maybe not depends on portal but only on http_routing - part of portal should be moved to http_routing and http_routing should be renamed (especially for frontend layouts, etc) so that apps like survey can reuse some common code Part of https://github.com/odoo/odoo/pull/29442 task-1932066
2019-02-26[MOV] web, *: simple moves of JS files to 'public' folderqsm-odoo
* web_editor, website, survey, im_livechat Part of https://github.com/odoo/odoo/pull/29442 task-1932066