Daily updates from Odoo
Sunday, March 17, 2024
1 change
Resolved issues and error corrections
This fix resolves a crash that occurred when users deleted a spreadsheet sheet containing Odoo charts. Previously, the system would retain references to charts from deleted sheets, causing the spreadsheet to fail when reopened. The fix ensures that charts are properly removed when their parent sheet is deleted, preventing the application from crashing.
Original PR description
__Current behavior before commit:__ When a sheet is deleted, `charts` from `OdooChartCorePlugin` are not being updated. Therefore, since the commit [`905d856`][1], `getOdooChartIds` returns some chart ids that do not exist on any sheet anymore. This induces a crash when opening a spreadsheet that contains such charts. __Description of the fix:__ Handle `DELETE_SHEET` event in `OdooChartCorePlugin` by removing Odoo charts that don't belong to any sheet. __Steps to reproduce the issue on runbot:__ - Insert a Odoo graph inside a spreadsheet (starting from any app) - Add a sheet to it to the new spreadsheet - Delete the sheet that contains the chart - Leave the spreadsheet - Go to Documents app and try to open the spreadsheet -> Traceback opw-3783745 [1]: https://github.com/odoo/odoo/commit/905d8565ad2fae3f7ff96606352ee3ab86ee78cb Forward-Port-Of: odoo/odoo#157728