Skip to content
Snippets Groups Projects
Commit 6f4c60fe authored by qsm-odoo's avatar qsm-odoo
Browse files

[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: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent d04ca05b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment