Daily updates from Odoo
Monday, May 25, 2026
2 changes · master
Resolved issues and error corrections
This update resolves an issue where spreadsheet formulas were breaking due to changes in translated labels. The update ensures that list headers remain stable, preventing formula errors and simplifying the spreadsheet experience for users. This improves data reliability and reduces potential disruptions.
Original PR description
With odoo/odoo#261686, list headers became translatable by default and we only stored explicit labels again when a pivot was created from a list range. This kept pivots stable, but formulas using list headers could still break when labels changed with translations. It also made the behavior harder to understand, as some headers were translated while others became fixed later on. In this commit: - store `string` again for newly inserted and user-edited lists so their headers stay stable - keep `string` optional for existing spreadsheets so they preserve their current behavior - remove the pivot-specific list header conversion logic - validate source dashboards in tests so their list columns keep omitting `string` and fall back to translated field labels Task: 6204484 Forward-Port-Of: odoo/enterprise#117070
This update fixes an error that occurred when selecting shift templates on planning slots, specifically when dealing with long periods of employee leave. The change ensures the system gracefully falls back to a previously calculated end date if the initial template calculation fails, preventing the application from crashing. This improves the reliability of the planning process.
Original PR description
Currently, an error occurs when a user selects a shift template on a planning slot. **Steps to Reproduce:** - Install the `Planning` module with demo data. - Create a `Resource Time Off` record with…
Currently, an error occurs when a user selects a shift template on a planning slot. **Steps to Reproduce:** - Install the `Planning` module with demo data. - Create a `Resource Time Off` record with `start` and `end date` separated by more than `1400 days (around 3.9 years)`, and Set the Working Hours field to Standard 40 hours/week. - Go to `Planning` > `Configuration` > `Shift Templates`, open an `existing record` or create a `new one`, and set the `Working Days` to more than 1 day. - Create a new `planning slot`, Assign the resource `Abigail Peterson`, and select the above `shift template`. `AttributeError: 'bool' object has no attribute 'replace'` This error occurs because when the user sets the shift template, the compute method runs to calculate the start and end datetimes [1]. It computes the end datetime by adding the template duration in working days from the given start datetime using the resource working calendar within a searchable range of around 1400 days [2]. During this computation, leaves and non-working days are skipped [3]. If no valid working interval is found within the searchable range, then it returns False [4], which raises the error [5]. This commit ensures that if plan_days returns False, the computation falls back to the previously calculated end date. [1]: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/planning/models/planning.py#L662-L671 [2]: https://github.com/odoo/odoo/blob/a439bd305112f6efc752ce900f7782e7faaf7312/addons/resource/models/resource_calendar.py#L826-L835 [3]: https://github.com/odoo/odoo/blob/a439bd305112f6efc752ce900f7782e7faaf7312/addons/resource/models/resource_calendar.py#L533-L537 [4]: https://github.com/odoo/odoo/blob/a439bd305112f6efc752ce900f7782e7faaf7312/addons/resource/models/resource_calendar.py#L835 [5]- https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/planning/models/planning.py#L653-L654 sentry-7472958590 Forward-Port-Of: odoo/enterprise#118062 Forward-Port-Of: odoo/enterprise#117073