Daily updates from Odoo
Tuesday, May 26, 2026
12 changes · master
Enhancements to existing features
This update implements a new payroll rule specifically for Indonesia, ensuring accurate overtime compensation calculations that comply with local labor regulations. This change improves payroll accuracy and reduces the risk of non-compliance with Indonesian laws. It impacts the HR and Payroll modules.
Original PR description
Created a salary rule for Indonesia overtime calculations to handle overtime compensation according to Indonesian labor regulations. Community PR: https://github.com/odoo/odoo/pull/265439 task-5194128
This update establishes a connection between employee records within the HR Payroll module. This linked list functionality improves data consistency and simplifies payroll processing by maintaining relationships between employees. It's an important improvement for accurate payroll calculations.
Original PR description
This commit adds two helper fields to form a linked list between employee records. task-6159337
Resolved issues and error corrections
This update fixes a technical issue in the Gantt view that prevented users from correctly filtering work orders when grouping by work centers. The fix ensures consistent functionality and prevents errors related to incorrect data interpretation, improving the overall planning process.
Original PR description
Before this commit: ------------------------- - When planning work orders in the Gantt view, applying a Group By on Work Center and then adding another grouping (e.g., Manufacturing Order or Status)…
Before this commit: ------------------------- - When planning work orders in the Gantt view, applying a Group By on Work Center and then adding another grouping (e.g., Manufacturing Order or Status) caused a traceback when clicking grouped rows in the panel. Steps to reproduce: ------------------------- 1. Install the `mrp_workorder` module. 2. Create and plan a Manufacturing Order. 3. Open the Planning Gantt view 4. Apply Group By → Work Center. 5. Add another group by (e.g., Manufacturing Order or Status) 6. Click on one of the groups (MO or Status) in the side panel. Cause of the issue: ------------------------- - Rows grouped by Work Center -> Manufacturing Order attempted to access a Work Center record that does not exist, leading to the error: `TypeError: Cannot read properties of undefined (reading 'display_name')` - Rows grouped by Work Center -> Status incorrectly treated the status value as a Work Center ID, leading to the error: `psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type integer` After this commit: ----------------------- - Rows created directly from the Work Center grouping are now correctly linked using their corresponding `workcenterIds` and remain clickable. - Rows created by additional groupings after Work Center (e.g., Manufacturing Order or Status) are no longer clickable. - This ensures a consistent interaction flow in the Gantt view and prevents the previous errors during filtering. Task ID: 6132396 Forward-Port-Of: odoo/enterprise#114565
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 WhatsApp channel avatars were incorrectly displaying the default Discuss avatar after a member was added. Now, avatars are correctly pulled from the channel's WhatsApp member, ensuring accurate representation and a better user experience for WhatsApp channel communication. This improves the visual consistency and reliability of the WhatsApp sidebar.
Original PR description
WhatsApp sidebar avatars should be resolved from the channel's whatsapp member, not from an arbitrary non-self member. Before this fix, adding a member to a WhatsApp channel caused the default Discuss avatar to be displayed instead of the actual WhatsApp member's avatar. This happened because the correspondent was not correctly computed for channels of type whatsapp. task-[5879840](https://www.odoo.com/odoo/project/1519/tasks/5879840) Forward-Port-Of: odoo/enterprise#118012 Forward-Port-Of: odoo/enterprise#115745
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.
A test was failing related to employee departures within the ESG HR module. This change corrected the test by ensuring that departures are only processed for employees with active contracts, aligning with business requirements. This resolves a technical issue preventing accurate reporting.
Original PR description
This test was failing due to the new changes at https://github.com/odoo/odoo/pull/264906 Departures can not be on an employee without a contract, hence the change from employee 3 (without a contract) to employee 1 (with a contract) in the test. task-6223154
This update resolves an issue preventing employers from correctly managing multiple MPF accounts linked to the same registration number. The change relaxes a previous restriction, allowing valid multi-account configurations while still ensuring uniqueness based on the combination of registration and account numbers. This improves data accuracy for Hong Kong payroll.
Original PR description
An employer can legitimately hold multiple employer account numbers under the same MPF registration number. The previous constraint rejected any two MPF schemes sharing the same registration number, blocking valid multi-account configurations. Fix the validation to only restrict the duplicate based on the combination of registration number and employer account number. task-6232561 Forward-Port-Of: odoo/enterprise#118109
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