Daily updates from Odoo
Tuesday, May 5, 2026
6 changes · 19.0
New functionality added to Odoo
This update prepares Odoo for a new Belgian tax regulation. Starting May 1st, a new 'Tax Provision Account' (411800) is added to support VAT periodic returns, replacing the previous account. This ensures accurate reporting and compliance with Belgian tax laws.
Original PR description
Starting May 1st, in Belgium the VAT provision account will replace the current account for periodic returns - Adding the new bank account - Adding a new account 'Tax Provision Account' 411800 Community PR: odoo/odoo#255272 Task [link](https://www.odoo.com/odoo/project.task/6044017) task-6044017 Forward-Port-Of: odoo/enterprise#116015 Forward-Port-Of: odoo/enterprise#111599
Resolved issues and error corrections
This change resolves an issue where the calculation of product quantities for kit products in rental orders was inconsistent with non-rental orders. It standardizes the calculation by excluding kit products, ensuring accurate quantity displays in reports and sales orders. This improves the reliability of inventory management for rental products.
Original PR description
The behavior for computing _compute_qty_at_date
fields(virtual_available_at_date, scheduled_date,
forecast_expected_date, free_qty_today, qty_available_today) with kit
products differs unexpectably with rentals vs. non-rentals.
This change unifies their behavior by avoiding kit products (through
display_qty_widget) field in sale_stock_renting.
Steps to Reproduce:
1. Create 2 products, both with kit BOMs, one rental, one non-rental
2. Give components non-zero
3. Create a rental order with both products
4. Odoo Inspect / Studio add above fields to view
5. See computed difference
opw-6141580This update fixes inaccuracies in how the Mexican employment subsidy was calculated, specifically addressing issues with threshold prorating and cumulative monthly caps. The changes ensure employees receive the correct subsidy amounts based on updated government regulations, preventing overpayments and improving payroll 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-5419659This update fixes an issue where flexible work schedules were incorrectly calculating overtime on timesheets. The fix ensures accurate overtime indications by correctly handling time zone conversions and date ranges, particularly for employees with flexible hours arrangements. This improves the reliability of timesheet reporting.
Original PR description
**problem:** On timesheets, the overtime indication next to an employee's name is incorrect when using flexible work schedules. for example: a "Flexible 20h" schedule (4h a day) shows 1h of negative…
**problem:** On timesheets, the overtime indication next to an employee's name is incorrect when using flexible work schedules. for example: a "Flexible 20h" schedule (4h a day) shows 1h of negative overtime even when the employee has logged exactly 20h for the week. **steps to reproduce:** 1. Create a new working schedule with flexible hours enabled for example (20h/week, 4h/day average) 2. Assign this schedule to an employee 3. Go to Timesheets, search for the employee 4. Navigate to a past week 5. Enter 4h on each working day 6. Observe the overtime indication shows incorrect value (-01:00) **cause:** In `resource/models/resource_calendar.py`, the flexible hours algorithm that determines the date range by converts UTC boundaries to the employee's timezone. When the employee's timezone has a positive UTC offset (UTC+1, like in brussels time zone), `Sun 23:59:59 UTC` becomes `Mon 00:59:59 CET`, pushing `end_date` to the next Monday. This creates an 8 day range instead of 7. The algorithm then starts a new weekly budget for the spillover day and allocates 1 extra hour, making `allocated_hours` 20.9999998 instead of 20. **fix:** - Use the UTC date before conversion to the employee's timezone when determining the flexible date range. - prefer `self` when it is the flexible calendar being queried, so hr_contract's `_get_calendar_at()` override cannot substitute the contract's calendar parameters (full_time_required_hours, hours_per_day) for the flexible ones. **note** Updating the test (`test_no_carried_over_leaves_for_flexible_resource`) in `hr_holidays/tests/test_expiring_leaves.py` expected duration logic, is to match the corrected inclusive day range and prevent asserting the previous spillover behavior. link to the enterprise PR: https://github.com/odoo/enterprise/pull/112879 link to the community PR: https://github.com/odoo/odoo/pull/257269 opw-5970511 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#115435 Forward-Port-Of: odoo/enterprise#112879
This update fixes a bug where unallocated earnings weren't appearing in the general ledger CSV export. The fix now includes these earnings and adds a 'Currency' column to the export, providing a more complete and accurate financial report. This improves the reliability of financial data for reporting.
Original PR description
1) The unallocated earning lines were missing from the general ledger csv export, as they are added in post-processing. The fix is to call `_get_lines` instead of the report custom engine directly. 2) Also adding the "Currency" column to the csv export.
This update fixes an error in the manufacturing report that incorrectly converted quantities between different units of measure (UoM). The report now accurately calculates production quantities and costs, ensuring consistent results regardless of whether products are measured in kilograms or tons. This improves the reliability of manufacturing cost reporting.
Original PR description
Steps to reproduce:
- Create a product W1 with UoM = Kg with the following BoM:
- Component C1: 1 unit, cost = $1
- Create and confirm MO1:
- Produce 1 Kg of W1 → total cost = $1
- Create and confirm MO2:
- Produce 1 Ton of W1 → total cost = $1000
- Open the Manufacturing Report and group results
Problem:
- qty_produced ≈ 1.001 instead of 1001
- unit_cost average ≈ 1000 instead of 1
Expected behavior:
- qty_produced = 1001
- unit_cost average = 1 (consistent across MOs)
The manufacturing report (`mrp.report`) incorrectly converts quantities from move UoM to product UoM, leading to wrong `qty_produced` and `qty_demanded` values when different units of measure are used
The current implementation uses:
sm.quantity / uom.factor * uom_prod.factor
This inverts the conversion ratio. As a result:
- 1 Ton is converted to 0.001 Kg instead of 1000 Kg
opw-6097098
Forward-Port-Of: odoo/enterprise#113979