Daily updates from Odoo
Wednesday, February 5, 2020
1 change · master
Resolved issues and error corrections
Website widgets now load their supporting files with the right website context, so website-specific styling and behavior are preserved. This prevents assets from being loaded without the current website ID, reducing broken or inconsistent website editor experiences.
Original PR description
*: 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.