From f0fc3ee7eb61df2a9c051e9daf0e6176437e25f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Rahir?= Date: Wed, 28 Sep 2022 16:02:27 +0000 Subject: [PATCH] [IMP] spreadsheet: Lazy load xml templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- addons/spreadsheet/__manifest__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/spreadsheet/__manifest__.py b/addons/spreadsheet/__manifest__.py index 84ec95d8380..68700866958 100644 --- a/addons/spreadsheet/__manifest__.py +++ b/addons/spreadsheet/__manifest__.py @@ -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/**/*',