[IMP] spreadsheet: Lazy load xml templates

Since the split of components with their templates in dedicated file in
https://github.com/odoo/o-spreadsheet/commit/10e1a0ca, the templates were eager-loaded.

However, this had an impact on the size of the `assets_qweb` bundle.
This commit introduces the lazy-loading of the `spreadsheet.o_spreadsheet`
bundle since it is now achievable.

A followup of https://github.com/odoo/enterprise/pull/30609

task 2896049

closes odoo/odoo#102118

X-original-commit: 15af10c207d6a359a58b5778bd414ff7b543a020
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
This commit is contained in:
Rémi Rahir
2022-10-04 18:06:43 +02:00
parent 01e62c051c
commit f0fc3ee7eb
+2 -5
View File
@@ -15,18 +15,15 @@
'assets': {
'spreadsheet.o_spreadsheet': [
'spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js',
'spreadsheet/static/src/**/*.js',
# Load all o_spreadsheet templates first to allow to inherit them
'spreadsheet/static/src/o_spreadsheet/o_spreadsheet.xml',
'spreadsheet/static/src/chart/odoo_menu/chart_figure.xml',
'spreadsheet/static/src/**/*.js',
'spreadsheet/static/src/**/*.xml',
('remove', 'spreadsheet/static/src/assets_backend/**/*')
],
'web.assets_backend': [
'spreadsheet/static/src/**/*.scss',
'spreadsheet/static/src/**/*.xml',
'spreadsheet/static/src/assets_backend/**/*',
('remove', 'spreadsheet/static/src/o_spreadsheet/o_spreadsheet.xml'),
('remove', 'spreadsheet/static/src/chart/odoo_menu/chart_figure.xml')
],
'web.qunit_suite_tests': [
'spreadsheet/static/tests/**/*',