Daily updates from Odoo
Monday, May 11, 2026
12 changes · 19.0
Resolved issues and error corrections
This update improves the speed of stock reconciliation by optimizing how the system filters account move lines. Previously, a slow process was used to exclude valuation accounts, but a new index has been added to dramatically reduce the time it takes to process these reconciliations, especially with large datasets.
Original PR description
Currently to exclude valuation accounts from the reconciliation we modify the domain by adding a second condition on the field account_id of the account_move_line table to exclude these accounts…
Currently to exclude valuation accounts from the reconciliation we modify the domain by adding a second condition on the field account_id of the account_move_line table to exclude these accounts while including them in a first condition in the method we override.
This is not very efficient as it prevents the use of indexes on that second NOT IN condition.
Indeed PostgreSQL prioritizes the use of the index on the IN condition and then applies the NOT IN condition in a filtering step, which is very costly when there are many account_move_line records belonging to the inventory valuation accounts.
Here is an example of the before after on a database with 87 million account_move_line records total and 9.5 million account_move_line records matching the first IN condition via an index while only 1 million remain after applying the filtering of the NOT IN condition.
All measures are performed with a warmed up cache
[Explain Before](https://explain.dalibo.com/plan/d0d14efbe51ch359)
### Benchmark:
<table>
<thead>
<tr>
<th># of aml</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td>87713812</td>
<td>~9s</td>
<td>~1.5s</td>
</tr>
</tbody>
</table>
[Explain After](https://explain.dalibo.com/plan/e882cf62d1ga6955)
## Potential further improvement:
Add a partial index:
```SQL
CREATE INDEX CONCURRENTLY idx_aml_company_id_account_id_unreconciled_posted
ON account_move_line (company_id, account_id)
WHERE parent_state = 'posted'
AND (reconciled IS NULL OR reconciled = FALSE)
AND (display_type IS NULL OR display_type NOT IN ('line_section', 'line_note'));
```
### Benchmark:
<table>
<thead>
<tr>
<th># of aml</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td>87713812</td>
<td>~1.5s</td>
<td>~900ms</td>
</tr>
</tbody>
</table>
[Explain After + Index](https://explain.dalibo.com/plan/56dfdh554668ed43)
Part of https://github.com/odoo/odoo/pull/261931
Forward-Port-Of: odoo/enterprise#116524
Forward-Port-Of: odoo/enterprise#115581This update fixes a limitation in the Helpdesk system where returns for dropshipped orders couldn't be processed. Now, the 'Returns' button is visible for Helpdesk tickets linked to dropshipped transfers, allowing users to manage returns for all orders, regardless of their shipping method. This improves efficiency and ensures accurate return processing.
Original PR description
### Steps to Reproduce: - Enable dropshipping in Inventory settings - Create a product with inventory tracking enabled - Enable dropship under the Inventory tab for the product - Add a vendor and…
### Steps to Reproduce: - Enable dropshipping in Inventory settings - Create a product with inventory tracking enabled - Enable dropship under the Inventory tab for the product - Add a vendor and quantity under the Purchase tab - Create a sale order for the product - Go to the Purchase stat button and confirm the order - Click on the Dropship stat button and validate the transfer - Open Helpdesk and create a new ticket for the same partner ### Issue: The "Returns" stat button is not visible for dropshipped deliveries. ### Current behaviour: - The helpdesk ticket allows returns of customer orders only if the order is outgoing. However, this does not cover the usecase where the order was dropshipped and still needs to be returned to the vendor. - With the current behavior, the user needs to find the customer's order to return the transfer as it is not possible to do from the ticket. ### Expected behaviour: Helpdesk tickets should also allow returns of dropshipped transfers (done and linked to the SO). ### Fix: The helpdesk return logic was limited to only 'outgoing' pickings. This commit extends the 'return' button should be visible if there is at least one delivery or dropship order linked to the partner of the ticket Issue:https://github.com/odoo/enterprise/pull/81378 task-4881338 Forward-Port-Of: odoo/enterprise#91402
This update fixes a reporting issue where the 'Quantity Produced' in the Production Analysis was incorrectly displayed in millions. The fix adjusts the calculation to accurately reflect the actual produced quantity, ensuring more reliable production data. This improves the accuracy of manufacturing reports.
Original PR description
### Steps to reproduce: - Download 'Manufacturing' app - Create a product and set its UoM to kg - Create a BoM for the product with the UoM in grams and the 'Quantity' is 1000+. The components can be…
### Steps to reproduce: - Download 'Manufacturing' app - Create a product and set its UoM to kg - Create a BoM for the product with the UoM in grams and the 'Quantity' is 1000+. The components can be in kgs - Create and produce 2 MOs, one in grams and one in kgs, for the new product - From the 'Reporting' > 'Production Analysis', choose pivot view > 'Quantity Produced' is in *millions* ### Cause of Issue: The issue was produced by PR:https://github.com/odoo/enterprise/pull/50398. https://github.com/odoo/enterprise/blob/5db870f93d8e2f5a4480561c483142eb99f3d0fe/mrp_account_enterprise/reports/mrp_report.py#L269-L270 the calculation above divides quantity produced by `uom.factor` which represents the stock move's UoM relative to the reference UOM (in this case 1 -> 1g = 1 Units). Then, the result is multiplied by `uom_prod.factor` which represents the stock move's UoM relative to the product's UOM (in this case 1000 -> 1000g = 1 kg), which results in the 'Quantity Produced' being in millions. opw-5955893
This update corrects inaccuracies in the data used for calculating payroll in Belgium (l10n_be_hr_payroll_prisma). Specifically, it addresses missing calculations for certain leave types (LEAVE280 and LEAVE115) related to work accidents and occupational diseases. This ensures accurate payroll processing for Belgian employees.
Original PR description
Issue: ---------------------------------------- Some prisma codes are wrong. Solution: ---------------------------------------- Change the data files. There are some subtilities that were not implemented: - LEAVE280: 0304 (if less than a year) and 0345 (if more) - LEAVE115: 0820 (Work accident) and 0830 (Occupational Disease) opw-6090081 Forward-Port-Of: odoo/enterprise#116642 Forward-Port-Of: odoo/enterprise#112949
This update resolves an issue where the 'Add a line' button was unresponsive on the top part of mobile grid views, like the Timesheets list. The fix adjusts how elements are sized on mobile devices, ensuring the button is always clickable regardless of the scroll position. This improves the user experience for mobile users.
Original PR description
**Steps to reproduce** On mobile: - Open a grid view (e.g. Timesheets > All timesheets) - Try to click on "Add a line" for the first employee - Issue: nothing happens. Notice that by scrolling down the list to employees at the bottom, it becomes possible to click on "Add a line". **Cause** `o_grid_cell_overlay` elements (with `h-100`) were taking more than the expected height in mobile, because the `o_grid_section_title` divs only have `position: sticky` on larger viewports. With the default `position: static`, the child element's height was exceeding its parent's height. opw-5853489 Forward-Port-Of: odoo/enterprise#113400
This update corrects a bug that prevented the generation of ABA files for payroll payments. Previously, the payment batch needed to be assigned before validation, which caused blank files. This fix ensures both the payment and payslip batches generate consistent ABA files, improving the accuracy of financial reporting.
Original PR description
Payslip batch needs to be assgned before the payment batch is validated, otherwise the ABA file will be blank. This commit ensures that flow and the test ensure both aba flows generate the same file content. task-6123029
This update resolves a bug where barcode scanning for products with different packaging units would intermittently assign quantities to the wrong line. The fix ensures accurate quantity updates by correctly matching the packaging uom during the scanning process, preventing alternating line assignments.
Original PR description
Issue ----- When there are 2 lines for a single product and different packaging uoms, scanning a packaging barcode alternates between lines. Steps to reproduce ----- - Enable packagings - Create a…
Issue ----- When there are 2 lines for a single product and different packaging uoms, scanning a packaging barcode alternates between lines. Steps to reproduce ----- - Enable packagings - Create a product AAA - barcode 1 - Create a packaging 6-Pack - 6 units - barcode for AAA set to 6 - Create a PO - one line for 30 units of AAA - one line for 5 6-Pack of AAA - Confirm PO and open picking in barcode - Scan "6" multiple times > Quantity increases on both lines, alternating for each scan Cause ----- Both lines can be found as matching lines when doing https://github.com/odoo/enterprise/blob/d279632db25713dd639a51385cad197dfdbd2bdc/stock_barcode/static/src/models/barcode_model.js#L1426 The reason it alternates between the lines is because we set the currently selected line first in the array - and since both lines match, the `foundLine` returned ends up being the non-selected line. https://github.com/odoo/enterprise/blob/d279632db25713dd639a51385cad197dfdbd2bdc/stock_barcode/static/src/models/barcode_model.js#L1823-L1832 We can avoid this y refining the `break` condition of the loop to also match the packaging uom. ----- Ticket: opw-6034572
This update resolves an issue where the automatic checkout feature would fail when an employee had multiple overtime entries on the same day, particularly when one entry lacked a defined checkout time. The fix addresses a calculation error that resulted in a validation error exceeding the 24-hour overtime limit. This ensures the automatic checkout process functions correctly for employees with complex overtime schedules.
Original PR description
__ ## Short functional explanation of the error When an employee has multiple overtimes for the same day, including one that doesn't have a check-out date. When running the scheduled action…
__ ## Short functional explanation of the error When an employee has multiple overtimes for the same day, including one that doesn't have a check-out date. When running the scheduled action `Attendance: Automatically check-out employees`, an error occurs: `odoo.exceptions.ValidationError: Duration must be positive and cannot exceed 24 hours.` ## Reproduction Steps 1. Create an employee. Set their timezone to UTC and the Overtime Ruleset to Default Ruleset in the settings tab. In the Payroll tab, set a contract start date. 2. Set their Working Hours to a fixed 40 hours/week. Set the timezone of the Working Schedule to UTC. 3. Go to attendances and create 2 attendances on a Sunday: one from 06:00 to 06:01 and a second that starts at 06:02 but that doesn't have a checkout date. 4. Go to Settings and enable Automatic Checkout. Leave the Tolerance to 2 hours. 5. Enable debug mode and go to Scheduled Actions. Look for `Attendance: Automatically check-out employees` and run it manually. ### Expected behavior As the tolerance is 2 hours, the second attendance check-out time should be set at 08:01. ### Unexpected behavior An error occurs: `odoo.exceptions.ValidationError: Duration must be positive and cannot exceed 24 hours.` ## Origin of the issue We retrieve overtime intervals with the domain: https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/hr_work_entry_attendance/models/hr_version.py#L34-L42 This will make us retrieve all the overtimes for a given day, even if overtimes belong to different attendances. However, this means that we will retrieve several times the same overtimes, as this piece of code is executed in this context: https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/hr_work_entry_attendance/models/hr_attendance.py#L35 https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/hr_work_entry_attendance/models/hr_attendance.py#L43 This results in the generation of intervals containing multiple times the same overtimes. We then sum their duration to later create work entries: https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/hr_work_entry_attendance/models/hr_attendance.py#L47 As we try to create a work entry with too much overtime, that exceeds 24 hours, it raises a validation error. Moreover, as the overtime hours are always stored in UTC, it makes sense to always keep the timezone as UTC when performing a `_read_group` . __ opw-6036064
This update resolves an issue where scanning pack-in-pack inventory counts wasn't working reliably. The fix ensures that inventory updates accurately reflect the quantity of items within nested packages, improving the accuracy of physical inventory counts. This prevents data discrepancies and ensures correct stock levels.
Original PR description
### Steps to reproduce: - In the settings enable "Packages" - Create a storable product A and put 1 unit in a package P in stock - Inventory > Products > Packages > open your package P - Set a parent…
### Steps to reproduce: - In the settings enable "Packages" - Create a storable product A and put 1 unit in a package P in stock - Inventory > Products > Packages > open your package P - Set a parent package PP as container - Inventory > Operations > Adjustments > Physical Inventory - Select you product line for A > Request a count (from the control panel button) - Enable Show Expected Quantity and confirm - Go to the barcode app > Count Inventory (1) - scan your parent package PP #### > traceback: Uncaught Promise > Cannot create property 'inventory_quantity' on boolean 'false' ### Cause of the issue: When the Package scan is processed, we loop over all quants related to it: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L566-L569 https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L602-L617 And for each of these we try to find an existing line representing the quant to update or we do create a new line. Now, the issue, is that the subpackages of the quant are not provided to find the quant candidate line to update. As such, no line is found we enter the else clause and try to createa a NewLine: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L617-L627 This time however, the appropriate subpackage (the one of the quant) is provided to the arguments. And, since the line representing this quant is already existing, the `_createNewLine` will return False: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L393-L399 https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L423 This leads to a traceback at the end of the else close since `false.inventory_quantity` doe not make sense (Cannot create property 'inventory_quantity' on boolean 'false') https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L626-L627 Fix: We adapt the `_processPackage` of the `BarcodeQuantModel` to mimic the existing 'update' behavior on the `BarcodePickingModel`: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_picking_model.js#L2110-L2133 Note that UOM converstion should not be required since quants are already uniformly expressed in the product uom: https://github.com/odoo/odoo/blob/30b4edace6b0859cb1b1ba4f7f2ea80ba5398e3d/addons/stock/models/stock_quant.py#L52-L54 opw-5864591
This update fixes an issue where users were incorrectly directed to a standard form view when opening documents linked through a Many2One field. Now, when a document is opened from this field, users will be taken directly to the Kanban view, allowing them to preview and navigate the document content effectively. This enhances the usability of document management.
Original PR description
Problem: When opening a linked `documents.document` record from a Many2One field added via Studio, the user is redirected to the standard form view. This is problematic because the form view does not allow the user to preview the actual document or navigate into it if the record is a folder. Solution: override `get_formview_action` to open the Kanban/List/Activity views. task-6068437 Forward-Port-Of: odoo/enterprise#116425 Forward-Port-Of: odoo/enterprise#113149
This update fixes an issue where the DMFA report incorrectly displayed '5' for 'Days Per Week' when employees worked fewer than 5 days a week. The fix accurately calculates the number of days based on the employee's actual working schedule, ensuring accurate reporting for Belgian payroll compliance.
Original PR description
## Issue When generating a DMFA report with a working schedule with more or less than 5 days a week, the *Days Per Week* value in the report is still appearing as 5. ## Steps to reproduce 1. Install…
## Issue
When generating a DMFA report with a working schedule with more or less than 5 days a week, the *Days Per Week* value in the report is still appearing as 5.
## Steps to reproduce
1. Install *Belgium - Payroll* (`l10n_be_hr_payroll`)
2. In Payroll's Settings:
- set *ONSS Registration Number* to `0830123456`
- set *DMFA Employer Class* to `083`
- create a *Work Address DMFA code* (any name, any numeral code, but set the *Working Address* to the Belgian company used for the rest of the steps)
3. In Employees' Settings, set the *Company Working Hours* to a new Working Schedule, with 9 hours/day, 4 days/week. E.g from Monday to Thursday included:
- Work from 8:00 to 12:00
- Lunch from 12:00 to 13:00
- Work from 13:00 to 18:00
4. Create an Employee E for the Belgian company:
- In the *Payroll* tab, set the start date of the contract to 01/01/2026.
- In the *Personal* tab, set the *NISS Number* to `85073003328`
5. Create the payslip for January 2026 for the Employee E.
6. In Payroll > Reporting > Belgium > DMFA, create a new DMFA for the first quarter of 2026 and generate the PDF report
7. **In the generated PDF report, the _Days per Week_ line is set to 5.**
## Cause
The number of days was calculated by multiplying `5` with the `work_time_rate` of the related calendar. This is inaccurate in the case of a company where employees are only expected to work 4 days a week.
opw-6103934
Forward-Port-Of: odoo/enterprise#116667
Forward-Port-Of: odoo/enterprise#113804This fix corrects a bug where users could still edit protected folders within the company's main document area. The system now ensures that the document details panel remains read-only when a protected folder is accessed, maintaining data integrity and security. This resolves an issue where permissions were not consistently enforced.
Original PR description
In odoo/enterprise#106192, we have modified the function userPermissionViewOnly that was preventing the user from editing document he cannot: we have removed the condition preventing user to edit…
In odoo/enterprise#106192, we have modified the function userPermissionViewOnly that was preventing the user from editing document he cannot: we have removed the condition preventing user to edit protected document (mainly folder at the company root). That was an error as even if the user has "edit" access (which is ensured in that method), the document can still be protected and the form to edit it should be in readonly then. We ensure here that the form in the details panel is in readonly in that case. How to reproduce: - log as demo and go to Document - Click on Inbox folder - Open details panel - Change for example the contact of the document You get an error while you shouldn't be able to edit it (as the folder is protected). Technical note: we re-add the condition in the method userPermissionViewOnly: (!this.documentService.userIsDocumentManager && this.record.data?.user_folder_id === "COMPANY") that we slightly modify to limit the protected document to folder only: (!this.documentService.userIsDocumentManager && this.record.data?.user_folder_id === "COMPANY" && this.record.data?.type === "folder") Task-5881531