[FIX] project: prevent menu_service from loading
Continuity of b859d78c. The assets generated for project sharing feature suffer from the same issue than `point_of_sale`. In master, we have to properly declare every file we need instead of realying on the whole `web.assets_backend`. Part of task 2860257 closes odoo/odoo#92577 X-original-commit: 45db27c3230a7c341206e9f990e8e5a133342c9f Related: odoo/enterprise#27914 Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com> Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This commit is contained in:
@@ -109,7 +109,6 @@
|
||||
],
|
||||
'project.webclient': [
|
||||
('include', 'web.assets_backend'),
|
||||
('remove', 'web/static/src/webclient/menus/*.js'),
|
||||
|
||||
# Remove Longpolling bus and packages needed this bus
|
||||
('remove', 'bus/static/src/js/services/assets_watchdog_service.js'),
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
<t t-set="head_project_sharing">
|
||||
<script type="text/javascript">
|
||||
odoo.__session_info__ = <t t-out="json.dumps(session_info)"/>;
|
||||
// Prevent the menu_service to load anything. In an ideal world, Project Sharing assets would only contain
|
||||
// what is genuinely necessary, and not the whole backend.
|
||||
odoo.loadMenusPromise = Promise.resolve();
|
||||
odoo.loadTemplatesPromise = fetch(`/web/webclient/qweb/${odoo.__session_info__.cache_hashes.qweb}?bundle=project.assets_qweb`).then(doc => doc.text());
|
||||
</script>
|
||||
<base target="_parent"/>
|
||||
|
||||
Reference in New Issue
Block a user