Friday, April 24, 2026
10 changes · 18.0
Resolved issues and error corrections
This update fixes an issue where deferred invoice moves weren't consistently linked to the correct customer partner. The change ensures that the partner ID is pulled directly from the original invoice line, maintaining accurate record-keeping and preventing discrepancies in financial reporting. This improves data integrity for deferred accounting processes.
Original PR description
When creating deferred move lines, the `partner_id` could be incorrectly influenced by the `default_partner_id` context key (e.g., when generating an invoice from a Sales Order). This led to inconsistencies where the deferred move lines did not match the partner on the original invoice line. This commit ensures the `partner_id` is explicitly taken from the source invoice line, guaranteeing data integrity across all deferred move lines. Steps: - Create a sale order for partner X, receive and confirm it - Create the invoice from the SO - Change partner to Y but keep X as delivery partner (not essential to reproduce bthough) - Set a deferred start date and a deferred end date on the invoice line, covering two full months - Confirm the invoice and open deferred moves via the smart button -> Note that one deferred move's lines get the partner id from the SO instead of the invoice opw-6095711
This update corrects a previous error in Odoo's French reporting module. Accounts 657 and 757, introduced by a recent French accounting reform (PCG 2025), are now correctly classified as part of current operations. This ensures accurate profit and loss statements.
Original PR description
…tions As part of the PCG 2025 reform in France, accounts 657 and 757 were introduced to handle capital gains and losses on the disposal of tangible and intangible assets related to normal, current activities. Previously, Odoo incorrectly categorized these under exceptional items which led to mismatches in the P&L. Source: https://www.anc.gouv.fr/files/anc/files/1_Normes_fran%C3%A7aises/Plans%20comptables/PCG--1er-janvier-2025.pdf Relevant excerpts: <img width="630" height="372" alt="image" src="https://github.com/user-attachments/assets/88a66dac-1cc0-4a33-a902-edb6b626f18f" /> <img width="631" height="318" alt="image" src="https://github.com/user-attachments/assets/403b65dc-20ba-447e-937d-20575f1f45ab" /> opw-6105764 Forward-Port-Of: odoo/enterprise#114837
This update resolves an error that occurred when users attempted to pay through express checkout on the website. The fix addresses a technical issue related to delivery discounts and ensures a smoother payment process. It prevents a 'ValueError' from disrupting the checkout flow.
Original PR description
Currently, an error occurs when user makes payment through express checkout on the website. Steps to Reproduce: - Install the `website_sale_loyalty` module. - Install `Demo` payment provider. - Go to…
Currently, an error occurs when user makes payment through express checkout on the website. Steps to Reproduce: - Install the `website_sale_loyalty` module. - Install `Demo` payment provider. - Go to `website` > `Shop` > `Add a product to the cart`. - `View cart` > `Pay with Demo` > `Pay`. - Click the `back button` (Chrome navbar) - Now, click `Pay with Demo` > `Pay` again. `ValueError: Expected singleton: sale.order()` The error occurs after this commit https://github.com/odoo/odoo/commit/bf8d08cd22b5d982a6a71353db5979f6b7545bd8, which overrides method [1] to include the delivery discount, if any. If order_sudo is empty, it raises this error [2]. This commit ensures that if order_sudo is not present, a UserError is raised with an appropriate message. [1]- https://github.com/odoo/odoo/blob/74a8334558bf86c07c0d68090a9126911867ef42/addons/website_sale/controllers/delivery.py#L160 [2]- https://github.com/odoo/odoo/blob/74a8334558bf86c07c0d68090a9126911867ef42/addons/website_sale_loyalty/controllers/delivery.py#L18 sentry-6759936549 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a critical error that prevented users from accessing newly created model pages on the website. The issue stemmed from a system crash when a model parameter was missing, leading to a `KeyError`. The fix ensures stable website functionality by correctly handling model access.
Original PR description
When accessing a model page through a website route, the system crashes with a `KeyError` if the model parameter is missing. This issue arises because the code attempts to access `request.env[False]`, which is not a valid model name. **Steps to Reproduce:-** 1. Install the `Website` and `Studio` modules. 2. Navigate to `Sales` and, using Studio, create a `new model page` for the sale order model. 3. The new page will now be visible on the website. 4. Uninstall the `Sale` module from the Apps. 5. Attempt to access the page from the website. **Error:-** `KeyError: False` **Solution:-** - When module is installed we need to also unlink the related `website.controller.page`. **Sentry - 6311722475** I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where Google Reserve appointments incorrectly displayed resources as available due to a lack of leave status checks. Additionally, a redundant offset from the frontend was removed, streamlining the process. This ensures accurate availability and a better user experience for booking appointments.
Original PR description
Resources on leave were still showing as available in BatchAvailabilityLookup responses because unavailabilities were not checked. Also remove the min_schedule_hours offset copied from the frontend logic. It is not relevant for Google Reserve as slots are pre-built in the feeds. Task-6150788
This update fixes an issue where flexible calendar hour calculations were inaccurate due to how time boundaries were handled. The fix ensures 'out of contract' hours are calculated correctly, regardless of user timezone, leading to more precise worked-time reporting. This impacts payroll accuracy for employees on flexible schedules.
Original PR description
Flexible calendar intervals are computed with date-only boundaries, which can shift the range used for worked time calculations. ### **Steps to reproduce:** 1) Install hr_payroll 2) Create a flexible…
Flexible calendar intervals are computed with date-only boundaries, which can shift the range used for worked time calculations. ### **Steps to reproduce:** 1) Install hr_payroll 2) Create a flexible working schedule with 56 hr per week and 8hrs avg per day 3) Create an employee with this working schedule and joined from `16th Feb 2026`. 4) Create a payslip for this employee for the February period. ### **Observed Behavior:** "out of contract" working hours are 120:59hr <img width="1213" height="406" alt="image" src="https://github.com/user-attachments/assets/3f7104fb-3a59-48e3-aaf6-052dcf18c0c0" /> ### **Expected Behavior:** "out of contract" working hours should be 120hr <img width="1225" height="429" alt="image" src="https://github.com/user-attachments/assets/98898b16-4e36-4a30-9460-633f32c53ec3" /> ### **Root Cause:** The flexible calendar interval computation trims the interval boundaries by converting them to dates at [1], and assumes `end_datetime` is always midnight at [2]. This ignores timezone effects, depending on the user timezone, `end_datetime_adjusted`, may still fall on the same day, so an extra day can be included in the computation. This produces incorrect worked-hours totals for flexible calendars. [1]- https://github.com/odoo/odoo/blob/a9a63976372d3b5411fd798a48cc5302c2de8af0/addons/resource/models/resource_calendar.py#L387-L389 [2]- https://github.com/odoo/odoo/blob/e49536031f61b90212eb6f0d1a8a3e15927e723d/addons/resource/models/resource_calendar.py#L402 ### **Fix:** Keep the full datetime values when computing flexible calendar intervals. Related Enterprise PR https://github.com/odoo/enterprise/pull/113119 **opw-6017569**
This update fixes an issue where out-of-contract hours were being incorrectly calculated for flexible work schedules. The change adds a test case to ensure accurate hour calculations when payslips cover periods starting or ending mid-day, preventing overpayment for employees on flexible contracts. This improves payroll accuracy and reduces potential financial discrepancies.
Original PR description
Currently, out-of-contract worked hours are overestimated for flexible calendars When the payslip period starts or ends in the middle of a day. ### **Steps to reproduce:** 1) Install hr_payroll 2) Create a flexible working schedule with 56 hr per week and 8hrs avg per day 3) Create an employee with this working schedule and joined from `16th Feb 2026`. 4) Create a payslip for this employee for the February period. This commit adds a test case for PR https://github.com/odoo/odoo/pull/257824 to ensure the worked hours for `out of contract` period. **opw-6017569**
This update resolves an issue where closing a tab with a new, unsaved record would trigger duplicate save attempts, leading to errors. The fix ensures that the browser's tab closing events are handled correctly, preventing these duplicate saves and improving data consistency. This improves the user experience when creating new records.
Original PR description
Currently, an error occurs when closing a tab with a new (unsaved) record. **Steps to replicate Error- 1:** - Install `hr`. - Open Employees and click new. - Give a name and close the tab (without…
Currently, an error occurs when closing a tab with a new (unsaved) record. **Steps to replicate Error- 1:** - Install `hr`. - Open Employees and click new. - Give a name and close the tab (without saving). **Error:** `KeyError: 'name'` ---- **Steps to replicate Error- 2:** - Install the `Time Off` module. - Go to `Time Off > Management > Time Off`. - Click on New and select an employee and close the tab. **Error:** `KeyError: None` --- **Cause:** - When closing the tab, the browser triggers both `visibilitychange` [1] and `beforeunload` [2]. - Both attempted to save, resulting in duplicate create calls — one with a valid payload and the other empty which leads to error at line [3]. **Solution:** - Skip the `beforeunload` urgent save if the record has no `resId`. This ensures that only existing records are saved at tab close. - Because `beforeunload` is called after `visibilitychange` so we let `visibililitychange` handle the save for new records. [1]: https://github.com/odoo/odoo/blob/6e6f2a0bc8b6b1dc3ef5f203530c6fb82a67132a/addons/web/static/src/views/form/form_controller.js#L467-L471 [2]: https://github.com/odoo/odoo/blob/6e6f2a0bc8b6b1dc3ef5f203530c6fb82a67132a/addons/web/static/src/views/form/form_controller.js#L482-L488 [3]: https://github.com/odoo/odoo/blob/6e6f2a0bc8b6b1dc3ef5f203530c6fb82a67132a/addons/hr/models/hr_employee.py#L476 sentry-6691540890,6234873849 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures that the barcode app validates the destination of products before confirming a receipt, even when a destination is forced. This prevents issues where users couldn't validate receipts if they hadn't scanned a destination, improving the reliability of the barcode picking process.
Original PR description
### Steps to reproduce: - In the settings: Enable "Storage Locations" - Inventory > Configuration > Warehouse Management > Operation Types - On receipts, in the Barcode App tab enable: "Force a…
### Steps to reproduce: - In the settings: Enable "Storage Locations" - Inventory > Configuration > Warehouse Management > Operation Types - On receipts, in the Barcode App tab enable: "Force a destination on all products" - Open the barcode app, create a new receipt - Scan a product > Validate #### > You are not blocked by the fact that you did not scan any destination even just to validate the default one ### Cause of the issue: The `barcode_validation_after_dest_location` operation type setting is not used at any point in the barcode app. ### Note: Line in the barcode app are always created a with a `location_dest_id`: https://github.com/odoo/enterprise/blob/a220fc61d9076decdb987421df9330a1c2c20546/stock_barcode/static/src/models/barcode_picking_model.js#L1310-L1322 In particular, even if the setting says: Force a destination on all products. It should rather be interpreted as force a destination scan before validation. Note that a destination scan will not necessarily update a single line but rather all concerned lines at once: https://github.com/odoo/enterprise/blob/a220fc61d9076decdb987421df9330a1c2c20546/stock_barcode/static/src/models/barcode_picking_model.js#L1558-L1576 It is therefore a valid call to check if a location dest was scanned to determine if the a destination was set on each product before validation of the picking, even if it is just to confirm the default destination. ### Note 2: We modify the `_get_barcode_config` to only provide a `barcode_validation_after_dest_location` if locations re enabled otherwise users enabling the option without the ability to scan locations would be soft lock and unable to validate their picking. That same logic already being applied to the `restrict_scan_dest_location` config parameter: https://github.com/odoo/enterprise/blob/6afe02e3e836df2822d7cae8aebbd5bdde6b34cc/stock_barcode/models/stock_picking_type.py#L109 opw-6110690
This update significantly improves the speed of importing large XML bills, particularly those received via Peppol or manual upload. By optimizing the database queries and update processes, the upload time has been reduced from failing to a manageable 11 minutes for a large bill. This enhances efficiency for accounting operations.
Original PR description
### Description: The upload and import process for large XML bills via Peppol or manual upload was inefficient due to two primary bottlenecks. First, the system performed individual queries per line to match products, taxes, and accounts, leading to an N+1 query issue. Second, multiple write operations were executed on each line to update various fields. This commit introduces batching and improve caching for these operations to reduce database call. ### Benchmark: | N° of lines | Before | After | |-------------|---------|-------| | 30264 | Timeout | 11min | ### Reference: opw-5416612