Files
odoo_source/addons/spreadsheet_dashboard
Rémi Rahir (rar) 83eaa9b37b [FIX] spreadsheet*: fix o-spreadsheet dependencies
The recent upgrade to chart.js 4.3.0 has forced us to make our own
plugin to support gauge charts. The plugin was added inside the
o-spreadsheet library which means that we now require chart.js to be
loaded before o-spreadsheet.

Notice we created a `spreadsheet.dependencies` assets bundle but
we don't include it in `spreadsheet.o_spreadsheet` bundle not do we use
it in the webclient code.

That's because `Chart.js` cannot be reloaded after the spreadsheet bundle
is loaded and the plugin was added. Reloading it after would override
`Chart.js` and remove the plugin. To prevent such situation, we
use `loadJS("/web/static/lib/Chart/Chart.js");` which is memoized. The same
call elsewhere in the code base won't actually ovewrite `Chart.js`.

closes odoo/odoo#133369

Task: 3482480
Related: odoo/enterprise#46424
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-08-31 09:04:56 +00:00
..
…
…