-
- Downloads
[FIX] website, *: lazy load widget assets of the correct website
*: web Before this commit, when a widget declared assets to lazy load through the assetLibs key, the asset was loaded through a context-less call to the server through the base `rpc` function. This caused problems in website: the website ID was not given to the called route and the loaded assets were then stripped of their specific-website parts. This commit solves the problem by allowing the `loadLibs` and `loadAsset` functions to receive an extra argument: an extra `context` to use for the actual call to the server. The method is now available in the ajax service, so that website can add its custom context automatically, the same way it does it for normal `_rpc` calls. Part of https://github.com/odoo/odoo/pull/44596 closes odoo/odoo#44596 Signed-off-by:Quentin Smetz (qsm) <qsm@odoo.com>
Showing
- addons/web/static/src/js/core/ajax.js 9 additions, 4 deletionsaddons/web/static/src/js/core/ajax.js
- addons/web/static/src/js/core/service_mixins.js 9 additions, 0 deletionsaddons/web/static/src/js/core/service_mixins.js
- addons/web/static/src/js/core/widget.js 1 addition, 1 deletionaddons/web/static/src/js/core/widget.js
- addons/web/static/src/js/public/public_root.js 13 additions, 3 deletionsaddons/web/static/src/js/public/public_root.js
- addons/web/static/src/js/services/ajax_service.js 8 additions, 0 deletionsaddons/web/static/src/js/services/ajax_service.js
- addons/web/static/tests/helpers/test_utils_mock.js 1 addition, 1 deletionaddons/web/static/tests/helpers/test_utils_mock.js
- addons/website/static/tests/tours/specific_website_editor.js 29 additions, 0 deletionsaddons/website/static/tests/tours/specific_website_editor.js
- addons/website/tests/test_ui.py 18 additions, 0 deletionsaddons/website/tests/test_ui.py
- addons/website/views/assets.xml 1 addition, 0 deletionsaddons/website/views/assets.xml
Loading
Please register or sign in to comment