Daily updates from Odoo
Tuesday, May 26, 2026
6 changes · master
Resolved issues and error corrections
This change improves performance by avoiding redundant queries when matching account statements to partners. Specifically, it eliminates unnecessary queries based on partner name and statement line data, reducing overall query execution time and improving responsiveness. This optimization enhances the user experience when viewing account statements and related partner information.
Original PR description
Various improvements related to performance for `<account.bank.statement.line>._retrieve_partner` Forward-Port-Of: odoo/enterprise#118267 Forward-Port-Of: odoo/enterprise#117738
This update fixes an issue where users could still add rental services to their cart even when resources were unavailable during their chosen time periods. The change moves critical time-checking code to ensure the system prevents users from adding unavailable products to their cart, improving the rental booking experience. This ensures accurate availability information is displayed to customers.
Original PR description
Before this commit, when the user goes to the webshop to take a rental service with rental service unavailable at a certain period, the system does not block the user when the resource is not available during 2 hours in the period chosen by the user. The reason is because the hours are not checked when website_sale_renting_stock is not installed. This commit moves the code checking the time of the rental period made in website_sale_renting_stock in website_sale_renting to be able to have that verification for rental service used with planning to make sure the system will prevent the user to add the product in his cart when the resource is unavailable. task-5123239 Forward-Port-Of: odoo/enterprise#118039 Forward-Port-Of: odoo/enterprise#114285
This update resolves an error that prevented rental orders from being confirmed in versions 17 and 18, and a subsequent division-by-zero error in newer versions. The fix skips unnecessary calculations when a Bill of Materials (BoM) isn't found, ensuring rental orders can be successfully confirmed.
Original PR description
**Steps to produce:** - Install `sale_mrp_renting`. - Enable `Rental Transfers` from settings. - Create a rental product. - Create two variants of the product. - Create a BoM for one variant and set…
**Steps to produce:** - Install `sale_mrp_renting`. - Enable `Rental Transfers` from settings. - Create a rental product. - Create two variants of the product. - Create a BoM for one variant and set its type to `Kit`. - Create a rental order using the other variant. - Try to confirm the order. **Issue:** In versions 17 and 18, a UserError is raised- ``` The unit of measure Units defined on the order line doesn't belong to the same category as the unit of measure False defined on the product. Please correct the unit of measure defined on the order line or on the product, they should belong to the same category. ``` From version 18.2 onward, a different error occurs ``` ZeroDivisionError: float division by zero ``` **Root cause:** In versions 17 and 18: At [1], since the BoM is created for a different variant , no BoM is found for the selected variant. As a result, when `_compute_quantity` is called at [2], the `bom.product_uom_id` is empty, which leads to the `UserError` from `_compute_quantity` method. In version 18.2+: At [1], as the BoM is empty. Then at [3], `_compute_kit_quantities` is called with an empty BoM, and at [4], this results in a division by zero error. **Solution:** Skip the computation when no BoM is found and directly return the quantity to avoid both the `UserError` and the `ZeroDivisionError`. [1]https://github.com/odoo/enterprise/blob/eaa70dcab2b49eadca1cf36008dd80cfccbb8e4e/sale_mrp_renting/models/sale_order_line.py#L13 [2]https://github.com/odoo/enterprise/blob/eaa70dcab2b49eadca1cf36008dd80cfccbb8e4e/sale_mrp_renting/models/sale_order_line.py#L20 [3]https://github.com/odoo/enterprise/blob/eaa70dcab2b49eadca1cf36008dd80cfccbb8e4e/sale_mrp_renting/models/sale_order_line.py#L21 [4] https://github.com/odoo/odoo/blob/91b09dbea5c8a306b5e9d2120466777f0248b360/addons/mrp/models/stock_move.py#L676 **opw-6082434** Forward-Port-Of: odoo/enterprise#118207 Forward-Port-Of: odoo/enterprise#114176
Internal agents were unable to access menu information due to a permissions error. This update restores necessary permissions, allowing agents to correctly retrieve menu details and resolve a previous access restriction. This ensures agents can function properly.
Original PR description
Purpose: -------- Currently an internal user can't use an agent that requires the list of available menus or get the details of any menu: an access error is raised stating that the user can't access ir.actions.client records. The issue for the get_available_menus was introduced by commit 15df7f50f67 in which the sudo was dropped when calling the tool. The sudo has been moved inside it when fetching the actions of the available menus. Task-6240831 Forward-Port-Of: odoo/enterprise#118153
This update incorporates the final migration of Owl3 to the Point of Sale (POS) module within Odoo Enterprise. This improves the POS system's performance and stability, ensuring a smoother experience for our retail partners. The migration also addresses technical debt related to the JesC framework.
This update fixes inaccuracies in how the Mexican employment subsidy is calculated, specifically addressing issues with salary thresholds and cumulative monthly limits. The changes ensure employees receive the correct subsidy amounts, aligning with updated government regulations and improving data accuracy.
Original PR description
The employment subsidy calculation was incorrect in two main scenarios: ### 1. Incorrect threshold prorating: The system was comparing the salary against the full monthly limit even for partial…
The employment subsidy calculation was incorrect in two main scenarios:
### 1. Incorrect threshold prorating:
The system was comparing the salary against the full monthly limit even for partial periods (weekly or bi-weekly). This resulted in employees wrongly receiving the subsidy when their proportional salary actually exceeded the limit.
Example: In 2026, the 14-day threshold should be 5,292.67 (11,492.66 / 30.4 * 14). Currently, an employee earning 10,000.00 in those 14 days still gets the subsidy because it's being compared against the full 11,492.66.
### 2. Cumulative monthly cap:
When multiple payslips occur in the same month, the total subsidy sometimes exceeds the statutory monthly maximum (536.22 for 2026) because the cap wasn't enforced across all slips.
Example: The 2026 maximum monthly subsidy is 536.22. In a month with three partial payslips:
- Mar 1st - Mar 14th: The system grants 246.68.
- Mar 15th - Mar 28th: The system grants 246.68.
- Mar 29th - Apr 11th: For the 3 days belonging to March, the system grants an additional 52.86.
Total subsidy for March reaches 546.22, exceeding the legal cap.
### Changes included in this PR:
- Updated `l10n_mx_rule_parameter_uma` to include monthly and annual values. This prevents rounding discrepancies.
Example: the 2026 annual UMA published is 42,794.64. In a rule the calculation is: l10n_mx_uma * 30.4 * 12 = 117.31 * 30.4 * 12 = 42,794.68 resulting in a ~0.04 difference.
- Create a new rule parameter `l10n_mx_rule_parameter_subsidy_salary_limit` to have the subsidy eligible threshold. Starting in 2026, the government's rounding changed from zero decimals(e.g., 9,081.00 in 2024, 10,171.00 in 2025) to two decimals (11,492.66). Storing these as explicit parameters avoids the precision errors.
- Added comprehensive unit tests covering:
- Complete periods: validates standard payslips aligned with the month calendar (bi-monthly, monthly, bi-weekly).
- Overlapping periods: validates split-month scenarios (14-day, 10-day, weekly) where periods cross month boundaries:
Example of self._overlapping_period("weekly", 7, 2646.33, (35.24, 88.10), (3, 123.34), (77.53, 35.24))
This test covers 5 weekly payslips with the following subsidy
distribution:
- Tuple `first_payslip` => (35.24, 88.10) means that:
First payslip (Apr 29 - May 5), the subsidy is 35.24 for April and 88.10 for May.
- Tuple `mid_payslips` => (3, 123.34) means that:
For the next 3 payslips fully in May, the subsidy is 123.34 each.
Payslip 2 (May 6 - May 12): Subsidy for May = 123.34
Payslip 3 (May 13 - May 19): Subsidy for May = 123.34
Payslip 4 (May 20 - May 26): Subsidy for May = 123.34
- Tuple `last_payslip` => (77.53, 35.24) means that:
Last payslip (May 27 - June 2), the subsidy is 77.53 for May and 35.24 for June.
- Across years: subsidy amounts and limits are updated annually.
Therefore, if a period overlaps two years, a salary amount might be eligible for a subsidy in January but not in the previous December, and the paid subsidy is increased in January due to the new limits.
- Cleaned up redundant tests (test_regular_payslip_subsidy) and adjusted decimal precision.
- For split-month `schedule_pay` periods, the first payslip might generate a subsidy. However, in subsequent payslips, due to commissions or a wage increase, the employee may exceed the monthly subsidy salary limit.
In those payslips, a warning is shown to notify the user that a manual adjustment is required.
Created tests to validate these cases.
target: 19.0
task-5419659
Forward-Port-Of: odoo/enterprise#116779
Forward-Port-Of: odoo/enterprise#107601