Daily updates from Odoo
Monday, May 12, 2025
10 changes · 18.0
Resolved issues and error corrections
This fix improves how accounting documents receive their official sequence numbers during large batch operations. It reduces database strain and avoids failures that could occur when many journal entries, assets, or batch payments are processed at the same time.
Original PR description
Creating many savepoints can lead to issues, not only in the current transaction, but also on other transactions from other connections on other databases[^1]. The `sequence.mixin` relies heavily on…
Creating many savepoints can lead to issues, not only in the current transaction, but also on other transactions from other connections on other databases[^1]. The `sequence.mixin` relies heavily on a unique constraint for giving a sequence without gaps[^2], which forces the use of savepoints because we expect the transaction to fail when assigning numbers with concurrent transactions. A previous commit removes savepoints created in a loop, which could happen when concurrency happens[^3], but there is still an issue when many records are getting a sequence number in the same transaction. This happens for instance when posting journal entries in batch (i.e. after an import), creating a `account.asset` in the past, or validating a batch payment with exchange differences. This commit is now locking the previous number, and then opening a new cursor in READ COMITTED in order to be able to see what other transactions did in the meantime. [^1]: https://github.com/odoo/odoo/pull/71395#issuecomment-851440042 [^2]: c45998c8368c6feb3d574d6d3d0ad064faf21679 [^3]: 10565c6968a5d0f285f93c4bdc610350999a88e3 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an Odoo 18 migration issue in Expenses where a wizard still referenced the old list view setting. Users should now see the intended expense list layout when splitting expenses, avoiding confusing or incorrect screens.
Original PR description
Description of the issue/feature this PR addresses: Incomplete migration to Odoo 18.0 regarding tree_view_ref/list_view_ref --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update refreshes Odoo's spreadsheet engine and fixes several issues affecting pivots, formulas, charts, and sheet duplication. Users should see more reliable spreadsheet behavior, especially when working with pivot tables and date grouping.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/9b3634067 [REL] 18.0.27 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/9b3634067 [REL] 18.0.27 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/56f15f64a [FIX] function: IF should not mutate its input [Task: 4783504](https://www.odoo.com/odoo/2328/tasks/4783504) https://github.com/odoo/o-spreadsheet/commit/c481408fe [FIX] pivot: handle undefined granularity [Task: 4742696](https://www.odoo.com/odoo/2328/tasks/4742696) https://github.com/odoo/o-spreadsheet/commit/fa27574d3 [FIX] pivot: add missing month granularity [Task: 4742696](https://www.odoo.com/odoo/2328/tasks/4742696) https://github.com/odoo/o-spreadsheet/commit/c4542385a [FIX] pivot: date dimension detection [Task: 4742696](https://www.odoo.com/odoo/2328/tasks/4742696) https://github.com/odoo/o-spreadsheet/commit/e2241428e [FIX] spreadsheet: add name to DUPLICATE_SHEET [Task: 4640070](https://www.odoo.com/odoo/2328/tasks/4640070) https://github.com/odoo/o-spreadsheet/commit/58009a9d2 [FIX] pivot: cannot use pivot formula inside its range [Task: 3986479](https://www.odoo.com/odoo/2328/tasks/3986479) https://github.com/odoo/o-spreadsheet/commit/c48960456 [FIX] chart: can `UPDATE_CHART` on a non-chart figure [Task: 4775605](https://www.odoo.com/odoo/2328/tasks/4775605) https://github.com/odoo/o-spreadsheet/commit/6b78636b2 [FIX] GridComposer: limit the composer size [Task: 4686816](https://www.odoo.com/odoo/2328/tasks/4686816) Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Mehdi Rachico (mera) <mera@odoo.com> Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
This fix ensures approval purchase lines use the correct purchase unit of measure instead of an incorrect unit identifier. This helps prevent errors or inconsistencies when approved items are converted into purchase-related records.
Original PR description
This commit fixes the bug introduces by this PR: https://github.com/odoo/enterprise/pull/83938 The UOM id must be the purchase UOM id. task-4751991
This fix prevents an error when saving Field Service tasks assigned to employees who do not have a work calendar set. It helps teams create and schedule service tasks more reliably, even when employee records are incomplete.
Original PR description
**Issue:** A traceback error is raised when the assignee of a Field Service task has no calendar **Steps to reproduce:** - Make sure admin (Michel Admin) has no calendar in the Employee module - Field Service > New - Create a new task with Michel Admin as assignee and click save without choosing Planned Date and leave Allocated Hours at 0 - Choose Planned Date then click save again A traceback error is raised opw-4672980
Spreadsheet pages now show a compact back arrow instead of full breadcrumbs on smaller screens. This saves space so users can still see the spreadsheet name clearly when working on mobile or narrow displays.
Original PR description
The redesign of the spreadsheet layout did not account for the small screen mode. Mor specifically, the breadcrumbs can be reduded to a "previous arrow" to spare some space to display the spreadsheet name. task-4774806
This fixes the employee dashboard filters so they again apply the correct company rules and include departed employees as intended. It prevents HR reporting figures from being skewed by a prior filter change that removed the departure reason condition.
Original PR description
Commit e33522cdc8fcc52 wrongly fixed the first domain of the three. `departure_reason_id` clause disapeared and the active=False was changed to active in [true,false]
Updating a pivot table from the spreadsheet side panel no longer removes the user's selected column sorting. This preserves the expected report order after changes such as adjusting filters, avoiding confusion and rework.
Original PR description
This commit fixes the fix 10f8722f5e7 🙈 Steps to reproduce: - go to a pivot view - sort a measure column - insert the pivot into a spreadsheet - open the side panel - update anything (e.g. the domain) => the sorting is dropped. What happened? Why didn't 10f8722f5e7 fixed the issue? I think I originally investigated and fixed the issue in master (or at least in saas-18.1+). Then I just blindly backported the fix to 18.0. BUT ! `sortedColumn.measure` changed in saas-18.1 with cb229b4a2ef247 After this commit commiit, it's the measure id, but it was the field name before. Task: 4746057
The Attendance Gantt view now calculates flexible schedule progress using the actual selected date range, without adding an extra day. This prevents misleading progress totals such as showing expected hours over 11 days when the range is shorter, improving accuracy for managers reviewing attendance.
Original PR description
### Steps to reproduce: - Create an employee with flexible schedule with 8 hours per day - Navigate to Attendance app -> Gantt View - Check the progress bar for the flexible employee - Notice the progress bar will show X/11 ### Cause: This is happening as when calculating the maximum value for the employee's working hours we are adding a day to the date range https://github.com/odoo/enterprise/blob/2da6836520c4e7760e57062e3e97a22b744baacf/hr_attendance_gantt/models/hr_attendance.py#L47 ### Fix: We don't need to add this extra day as already the difference between the start and stop is relfecting the correct number of days opw-4680513
The Hong Kong payroll MPF export now handles employees who do not have a Manulife account number or surname entered. This prevents report generation from failing and lets payroll teams produce the required Manulife MPF report as expected.
Original PR description
Steps to reproduce: - Setup an employee with identification_id, and l10n_hk_given_name - Leave l10n_hk_mpf_manulife_account and l10n_hk_surname empty - Generate Manulife MPF report with any payslips Current behavior: - Error raised Expected behavior: - Should be able to generate the report