Thursday, December 18, 2025
9 changes · 18.0
Resolved issues and error corrections
This update resolves an error that occurred when sending quotations with a negative tax rate. The issue stemmed from a misconfiguration in how a key was being populated, leading to an attempt to access a missing key within the UBL export process. This fix ensures the system correctly handles negative tax scenarios, preventing the error and allowing quotations to be successfully sent.
Original PR description
Currently an error is generated when the user tries to send a quotations to the users. Steps to produce an error: - Create a new database with demo data and install `sale_management` - Go to…
Currently an error is generated when the user tries to send a quotations to the users.
Steps to produce an error:
- Create a new database with demo data and install `sale_management`
- Go to Invoicing > Configuration > Accounting >Taxes
- Create a new tax with a negative percentage, e.g., -10%
- Create a new `Quotation` and add a product line with the above-created negative tax.
- Error is generated when we try to `Send` this `Quotation`
Error: `KeyError: {'is_withholding': False, 'currency': res.currency(8,)}`
This issue occurs because the key `tax_total_grouping_key` is missing from `ubl_values[target_key]`. As we see at code line [1], there is already a condition intended to continue and avoid accessing the key when `tax_total_grouping_key` is empty. However, this condition is never triggered because `tax_total_grouping_key` is never empty.
The reason is that `tax_total_grouping_key` is populated from `ubl_default_tax_total_grouping_key` method. As shown in [2], this method always returns a value since it uses a static dictionary. Therefore, `tax_total_grouping_key` is guaranteed to have a value, making the empty check ineffective and allowing the code to attempt access to a key that may not exist in `ubl_values[target_key]`.
This commit fixes the issue by accessing `tax_total_grouping_key` from `ubl_values[target_key]` only when it is available.
[1]: https://github.com/odoo/odoo/blob/c620283459d802d06d07900652752d9f5ad3abef/addons/account_edi_ubl_cii/models/account_edi_ubl.py#L537
[2]: https://github.com/odoo/odoo/blob/c620283459d802d06d07900652752d9f5ad3abef/addons/account_edi_ubl_cii/models/account_edi_ubl.py#L99-L110
sentry-7113127232This update resolves an error that occurred when generating payslips for employees whose schedules didn't include Saturday public holidays. The fix ensures the system correctly verifies holiday presence in the employee's schedule before generating the payslip, preventing errors and ensuring accurate payroll processing. This improves the reliability of the HR payroll system.
Original PR description
## Short functional explanation of the error Let's say we have created a public holiday on a Saturday, which is out of an employee's schedule as they work from monday to friday. When trying to create…
## Short functional explanation of the error Let's say we have created a public holiday on a Saturday, which is out of an employee's schedule as they work from monday to friday. When trying to create a payslip for this employee for the month the public holiday occurs, it will show an error. ## Reproduction Steps 1. Create a public holiday on a Saturday. Set the Working Hours to a schedule not including Saturdays. Set the Work Entry Type as Generic Time Off. 2. Click on the Configuration tab > Time Off Types. 3. Create a Time Off type. Set the Requires Allocation field at No Limit, and the Work Entry Type field at Generic Time Off. 4. Click on the Management tab, then Time Off. 5. Click on New. Make sure to select an employee who has the same working schedule as the one you set for the public holiday, and that on their contract, their Work Entry Source is set to Working Schedule. Set the Time Off Type field to the one you just created. 6. Save and click Approve. 7. Go to Payroll. In Contracts, make sure that the employee's contract is running, and that their contract type is Full-Time. 8. Click on the Payslips tab > to pay. 9. Click on New and select the employee for which you just created a time off. ### Expected behavior The payslip is created. ### Unexpected behavior An Odoo Error Occurs. ## Origin of the issue In the code, we don't verify that the holiday is present in the employee schedule before computing the name of the payslip: https://github.com/odoo/enterprise/blob/a7e954dbe4a68b1770341e754101319a89e4de9e/hr_payroll/models/hr_payslip_worked_days.py#L87-L92 We simply check if one holiday exists, which is the case as a public holiday is applied to every employee. Therefore, we need one more check. __ opw-5269302 Forward-Port-Of: odoo/enterprise#100445
This update fixes an issue where rental order scheduling wasn't updating correctly. The change mimics the rescheduling behavior of purchase orders, ensuring that rental transfer dates are adjusted when the rental order's period is extended. This improves the accuracy of rental tracking and management.
Original PR description
### Steps to reproduce: - In the settings enable "Rental Transfers" - Create a storable and rentable product P - Create and confirm a rental order for 1 unit of P - Change the rental period to 10 days in the future #### > The rental tranfers were not updated accordingly ### Cause of the issue: Nothing is currently implemented to reschedule the rental transfers. ### Fix: We somewhat mimic the reschedule purchase behavior: https://github.com/odoo/odoo/blob/6ca34a0f5347e0611cde95453119dda8b40fa589/addons/purchase_stock/models/purchase_order_line.py#L98-L101 But we rely on the order itself rather than its order lines since the `start_date` and the `return_date` are related fields so that no `write` is triggered when the order is rescheduled: https://github.com/odoo/enterprise/blob/96a80f583a0ca502ff06bc05d03775c76c6a7537/sale_renting/models/sale_order_line.py#L18-L19 opw-5158508
This update fixes an issue where manufacturing order end dates were incorrectly calculated, assuming work centers operated 24/7. The change now accurately considers work center availability, ensuring more precise scheduling and preventing inaccurate duration estimates.
Original PR description
**Issue** The scheduled end date of a manufacturing order incorrectly assumes that the work center operates 24 hours a day. **Steps to reproduce** 1. Create a manufacturing order with: - A work order…
**Issue** The scheduled end date of a manufacturing order incorrectly assumes that the work center operates 24 hours a day. **Steps to reproduce** 1. Create a manufacturing order with: - A work order with an expected duration of 1440 minutes. - A work center configured to work 8 hours per day. 2. Observe that the scheduled end date is computed as if the work center operates 24h/day resulting in an end date 1 day instead of 4 after the starting date. **Cause** The [`date_finish` computation](https://github.com/odoo/odoo/blob/680085b55728dcb000e7bb4277bb83b0e4e2ce91/addons/mrp/models/mrp_production.py#L745C1-L746C105) does not take into account neither the work center’s calendar nor the workorder dependency when estimating the duration. **Solution** Use [`_get_first_available_slot`](https://github.com/odoo/odoo/blob/5d75037d4f81d71a50394c3d390c420967766731/addons/mrp/models/mrp_workcenter.py#L332) to consider workcenter availability, inspired from when a [workorder is planned](https://github.com/odoo/odoo/blob/5d75037d4f81d71a50394c3d390c420967766731/addons/mrp/models/mrp_workorder.py#L527) and implements a topological sort to acknoledge the wo dependencies. **Additionnal note** - To make the change minimal, if a workcenter of at least one workorder is unavailable, just fallback on the previous computation. - This commit use assertAlmostEqual for the same reason than https://github.com/odoo/odoo/commit/e6c958ca226bd8ef7e518243c93e40b92b9b5919 opw-5084120
YouTube recently updated its security policies, causing videos embedded on our website to be blocked. This PR addresses this issue by directly setting the required 'referrerpolicy' attribute on YouTube iframes, ensuring videos continue to play correctly. This prevents errors and maintains a smooth user experience.
Original PR description
Issue: YouTube has changed its referrer policy to enforce "strict-origin-when-cross-origin". Without this, it can throw a 153 error and block the video. To replicate in runbot ,add "<meta…
Issue: YouTube has changed its referrer policy to enforce "strict-origin-when-cross-origin". Without this, it can throw a 153 error and block the video. To replicate in runbot ,add "<meta name="referrer" content="no-referrer"/>" to any major page like the main layout or footer. This sets it for the entire page. Therefore, to enforce YouTube's calls to have the proper referrerpolicy, I hardcoded it directly. Fix: added 'referrerpolicy="strict-origin-when-cross-origin"' to the iframe. opw-5239363 Description of the issue/feature this PR addresses: Our website allows for customization, including the ability to modify meta tags. In ticket#523963, the customer added "<meta name="referrer" content="no-referrer" />" which forced all calls to be set with referrerpolicy="no-referrer" when it's required to have 'referrerpolicy="strict-origin-when-cross-origin"' for embeded videos to youtube Current behavior before PR: If a customer sets "<meta name="referrer" content="no-referrer" />" on any page, YouTube blocks it on that page; if it's in the header or footer, the entire website is then blocked. Desired behavior after PR is merged: After it now enforces the call to have 'referrerpolicy="strict-origin-when-cross-origin"' even if the tag <meta name="referrer" content="no-referrer" />". Allowing YouTube to be used. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where loyalty programs weren't always applied correctly when multiple programs were added to a POS order. The change uses a 'mutex' to ensure only one update process runs at a time, guaranteeing all loyalty discounts are applied consistently. This improves the reliability of the POS loyalty system.
Original PR description
When adding a lot of loyalty programs with discounts to an order the updatePrograms method could be called multiple times in parallel, that would cause an issue where some of the programs were not…
When adding a lot of loyalty programs with discounts to an order the updatePrograms method could be called multiple times in parallel, that would cause an issue where some of the programs were not applied correctly. Steps to reproduce: ------------------- * Create 7 loyalty programs that apply on the same product, each with a discount reward of 10%. (Give them different name) * Create a POS order with 1 unit of that product. > Observation: Only the 6 first programs are applied. Why the fix: ------------ The issue is happening because the updatePrograms is called multiple times in parallel, and when coming to this block of code : https://github.com/odoo/odoo/blob/f3e74f9b840efef7c567ba31acd6ac61c79b5d6d/addons/pos_loyalty/static/src/overrides/models/pos_store.js#L182-L188 The last program has 2 coupons in the `couponPointChanges`, so it will proceed to delete all the coupons of the concerned program. To avoid this we use a mutex to ensure that only one call to updatePrograms is happening at a time. opw-4974788
This update fixes a limitation in the synchronization of Uruguayan vendor bills. Previously, only the first CFE (Comprobante Fiscal Electrónico) from an XML file was processed. Now, all CFEs within the file are correctly processed, ensuring complete and accurate data import for purchase orders.
Original PR description
When an uruguayan xml file is uploaded on a purchase journal it could contain the information of more than one CFE but before this commit only the first CFE was processed. Now all the CFEs are processed. Take in consideration this comment https://github.com/odoo/enterprise/pull/86829#discussion_r2490754143 Task Adhoc side: 60187 Task latam side: 1371
This update resolves an issue where public holidays weren't being correctly identified in Odoo's scheduling calculations when working schedules lacked a company association. This prevented accurate leave management and scheduling, particularly in environments with multiple companies. The fix ensures holidays are recognized as working days when calculating leave requests.
Original PR description
This PR https://github.com/odoo/odoo/pull/236043 adds a constraint when calculating the public holidays that check for the company of the working schedule, while in some flows the working schedule has no company_id assigned. This will lead to some errors, as it won't recognize the day as a public holiday. As an example, the public holiday will be counted as a working day when taking leaves that include that day. opw-5401425 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects critical issues with credit note processing for Kenyan e-invoicing (KRA). Specifically, it now prevents credit notes from being created with mismatched customer PINs or dated before the original invoice, ensuring compliance with KRA regulations and preventing potential rejection of credit notes.
Original PR description
* Prevent credit note with customer PIN different than the submitted invoice. * Prevent credit note to be dated before the original invoice date. task-5160113 Forward-Port-Of: odoo/enterprise#100480