Daily updates from Odoo
Tuesday, May 26, 2026
128 changes
26 changes
Resolved issues and error corrections
A recent update to Odoo's document signing process caused errors when downloading signed documents. This fix corrects a problem with how PDF compression was handled, specifically related to newer versions of the pypdf library. The change ensures documents download correctly, improving the user experience within the Sign app.
Original PR description
This [related PR] introduced a compression pass after calls to mergePage(). However in newer versions of pypdf (>=3.5.2), compress_content_streams() can only be called on pages of PdfWriter. An error would be raised when called on pages of a PdfReader. Steps to reproduce ----- 1. Run Odoo with pypdf>=3.5.2 2. Sign and download a document in the Sign app 3. Traceback occurs Fix ---- This commit moves the compression to the writer object, after the merged page has been added. Related pr: https://github.com/odoo/odoo/pull/261879 runbot-937761 Forward-Port-Of: odoo/enterprise#118271 Forward-Port-Of: odoo/enterprise#117756
This update corrects a bug where re-invoiced expenses on sales orders incorrectly displayed the total expense amount as the unit price. The fix ensures that the quantity of the expense is properly reflected on the sales order line, resolving a pricing discrepancy. This improves the accuracy of sales order reporting.
Original PR description
Currently, when re-invoicing an expense paid by company, the line added to the sale order will show a price unit equal to the whole expense amount. Steps to reproduce: - Create a new Expense Category with Re-Invoice Costs set to 'At cost' - Create a new Expense, set the new category, and set Paid By to 'Company' - Set Quantity to greater than 1, and Customer to Re-Invoice to any Sales Order - Confirm and Submit Journal Entry on the Expense record Issue: - On the linked Sales Order you will see the total of the expense is used as the unit price This occurs because we don't pass the quantity to the move line creation vals, which then default to 1. In turn, when the sale order line is added, the unit price will be based on the move line vals but the quantity will match the expense. opw-5883290 Forward-Port-Of: odoo/odoo#246816
This update fixes an issue where Time Off requests with hour durations were incorrectly displaying 12:00 AM instead of calculated hours. The fix ensures that 'request_hour_from' and 'request_hour_to' accurately reflect the requested time off duration, particularly when a default hour-based Time Off type is selected. This improves the accuracy of Time Off requests.
Original PR description
…to hours ## Issue: 'request_hour_from' and 'request_hour_to' should be computed using the default calendar attendance values, but instead they display 12:00 AM, meaning their values remain 0.0. ##…
…to hours ## Issue: 'request_hour_from' and 'request_hour_to' should be computed using the default calendar attendance values, but instead they display 12:00 AM, meaning their values remain 0.0. ## Steps to Reproduce: - Open the Time Off app. - Configure a Time Off Type with the Duration Type (request_unit) set to Hours. - Set this Time Off Type as the default one while creating a new Time Off. - Create a new Time Off request. - Observe that 'request_hour_from' and 'request_hour_to' are not computed and display 12:00 AM (0.0). ## Root Cause: While fixing the issue related to preserving leave hours when changing Time Off Types, a regression was introduced. Related PR: https://github.com/odoo/odoo/pull/227235 During the creation of a new Time Off with the duration type set to Hours by default, the field 'request_unit_hours' is already True. This prevents the computation of 'request_hour_from' and 'request_hour_to', resulting in both values remaining 0.0. ## Solution: Compute 'request_hour_from' and 'request_hour_to' when their values are still 0.0 (initial Time Off creation case), and skip recomputation only when switching between Time Off Types in order to preserve manually entered hours. Steps to reproduce : [Video](https://drive.google.com/file/d/1P2MFIj8ZxFtFxv2FlX4Zdq6P-5veTxUb/view?usp=sharing) OPW: 6209992 Forward-Port-Of: odoo/odoo#266104 Forward-Port-Of: odoo/odoo#264707
This update resolves an issue where cancelled food delivery orders continued to show as 'Draft' in the POS interface. The fix synchronizes the POS order state with the delivery state upon cancellation, ensuring that preparation displays are also updated correctly. This improves the accuracy of order status and prevents confusion for staff.
Original PR description
pos*: pos_urban_piper, pos_enterprise When a food delivery order is cancelled from the aggregator side, the PoS order remains active on the frontend instead of reflecting the cancelled state. Steps to reproduce: - Configure UrbanPiper with Atlas - Place an order via Atlas - Open the order from the notification bar - Cancel the order from Atlas Issues: - Cancelled orders continue to appear in `Draft` - Accepted/preparation orders are not cancelled on the preparation display Fix: - Synchronise the PoS order state with the delivery state on cancellation - Update preparation display orders when delivery orders are cancelled Task-6217704 Forward-Port-Of: odoo/enterprise#118288 Forward-Port-Of: odoo/enterprise#117374
This update resolves an issue where importing company data would incorrectly trigger the installation of language-specific (L10N) modules, leading to errors and data corruption. The fix ensures that L10N modules are only installed when explicitly requested, improving import stability and data integrity.
Original PR description
# How to reproduce - Start from a fresh database - Install the account module - Import companies with a data file. These companies need to have a country set and the data file needs to contain some…
# How to reproduce - Start from a fresh database - Install the account module - Import companies with a data file. These companies need to have a country set and the data file needs to contain some bad data - Click on the Test button # The problem An Odoo Server Error is displayed saying : "savepoint xxx does not exist", which prevents the import or hides other potential error. More importantly, the date is imported even though it was a test run. # Cause Importing companies with a country will import their respective l10n modules using `button_immediate_install()` : https://github.com/odoo/odoo/blob/6de867f1c92bacedc0574b63e9e6a2a57fe805dd/odoo/addons/base/models/res_company.py#L319-L322 https://github.com/odoo/odoo/blob/661ddbb7f12e32394a3c11b5a4cd2f38a9e156f5/odoo/addons/base/models/res_company.py#L237 This import calls `cr.commit` : https://github.com/odoo/odoo/blob/661ddbb7f12e32394a3c11b5a4cd2f38a9e156f5/odoo/addons/base/models/ir_module.py#L632-L634 The issue is that when importing a data file, we create savepoints : https://github.com/odoo/odoo/blob/661ddbb7f12e32394a3c11b5a4cd2f38a9e156f5/odoo/orm/models.py#L971-L974 And if an error arise during our import, we rollback to the appropriate save point. Sadly, commiting erases any existing save point, so a savepoint error is rased and the data is not rolled back. The problem stems from the fact that importing module is simply not transactionnal and `button_immediate_install()` is not expected to be called with a savepoint. This was already partly adressed by : https://github.com/odoo/odoo/commit/66dcee9aa70dc72a332fde64dbc802266bbe4a5a But it did not cover the file importing case opw-6174983 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265188
This update significantly speeds up the generation of Point of Sale reports by optimizing a key database query. Previously, the system searched through millions of account moves, which was slow. Now, the query is more efficient by targeting only account moves linked to specific payment journals, resulting in a much faster response time.
Original PR description
Currently the query to get the closing difference account move is done by searching for the reference of the move, which is not very efficient. This commit optimizes this query by adding the journal…
Currently the query to get the closing difference account move is done by searching for the reference of the move, which is not very efficient. This commit optimizes this query by adding the journal to the search criteria, which allows us to benefit from the index on the journal_id field. Here is an example of the before after on a database with 39 million account_move records. Meanwhile only 10-20K account_move are linked to specific journals used in POS payment methods. All measures are performed with a warmed up cache [Explain Before](https://explain.dalibo.com/plan/h8edf56c09d7dfd7) ### Benchmark: <table> <thead> <tr> <th># of am</th> <th>Before</th> <th>After</th> </tr> </thead> <tbody> <tr> <td>38982635</td> <td>~17s</td> <td>~22ms</td> </tr> </tbody> </table> [Explain After](https://explain.dalibo.com/plan/be2397f176a6b29d) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262148
This update resolves a bug that caused errors when confirming rental orders in versions 17 and 18, and a subsequent division-by-zero error in newer versions. The fix ensures that the system correctly handles rental orders with kits, preventing errors and improving order processing reliability.
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
This update fixes a critical issue where canceled orders in the Point of Sale (POS) system weren't immediately reflected on the frontend. The change ensures that cancellations made in the backend are accurately displayed in the POS interface, improving order accuracy and reducing potential customer confusion. This update was triggered by a bug fix.
Original PR description
Step: --------- - Install point_of_sale. - Open a POS session with presets configured. - Add an order line and select the takeout order preset. - Cancel the order from the backend. Issue: --------- - The cancelled order is not reflected in the frontend. Cause: --------- - The frontend is not notified when the order is cancelled from the backend. Fix: --------- - Notify the frontend when a backend order is cancelled. Task-5406984 Forward-Port-Of: odoo/odoo#264791 Forward-Port-Of: odoo/odoo#240725
This update fixes an issue where the picking origin document incorrectly referenced the previous MO name after a manufacturing operation type was changed before confirmation. The fix ensures that the picking document accurately reflects the new MO name, improving inventory accuracy and preventing potential order fulfillment errors. This was triggered by a multi-step manufacturing route.
Original PR description
**Issue**: When the name of a MO changes before confirmation, the picking origin may remain incorrect after confirmation. **Steps to reproduce**: - Make sure that multi-step route is enabled in the…
**Issue**: When the name of a MO changes before confirmation, the picking origin may remain incorrect after confirmation. **Steps to reproduce**: - Make sure that multi-step route is enabled in the settings - Configure the manufacturing route as 2-step - Go to Inventory > Configuration > Warehouse Management > Operations Types - Clone the "Manufacturing" operation type and assign a different Sequence Prefix - Create and save a MO, without confirming it - Change and save the operation type to the cloned one (the MO name changes) - Confirm the MO -> The picking source document uses the previous MO name instead of the new one **Cause**: The source document of the picking (`origin`) comes from its move: https://github.com/odoo/odoo/blob/95c73aa4dd7433f394799fdaaad57a84d750ec5a/addons/stock/models/stock_move.py#L1526 The move origin comes from the procurement values: https://github.com/odoo/odoo/blob/95c73aa4dd7433f394799fdaaad57a84d750ec5a/addons/stock/models/stock_move.py#L1575C13-L1575C56 Which relies on `self.reference_ids[0].name`: https://github.com/odoo/odoo/blob/95c73aa4dd7433f394799fdaaad57a84d750ec5a/addons/stock/models/stock_move.py#L1639 which is never updated, causing the origin to keep the previous MO name. opw-5979778 Forward-Port-Of: odoo/odoo#255874
This update ensures that forced full packaging reservations are correctly applied, even when large quantities of stock are available. Previously, the system was incorrectly calculating reservations based on multiples of packaging units, leading to inaccurate stock levels. This fix now accurately reflects the intended behavior of reserving only full packaging units.
Original PR description
Issue ----- Forced full packaging reservation setting is ignored when there is a big quant in stock. Steps to reproduce ----- - Enable packagings - Create a product category "Super Category" -…
Issue
-----
Forced full packaging reservation setting is ignored when there is a big quant in stock.
Steps to reproduce
-----
- Enable packagings
- Create a product category "Super Category"
- Reserve Packagings: Reserve Only Full Packagings
- Create a stored product "AAA"
- Product Category: Super Category
- 50 units on hand
- Packaging: 6-Pack (6 units)
- Create a delivery for 15 units of AAA
> Reservation is made for 15 units
Cause
-----
The rounding to a multiple of the packaging quantity takes the stock quant into account. For our example case, we have 8 full 6-Packs on hand, so the `available_quantity` gets set to 48 when doing
https://github.com/odoo/odoo/blob/5e458236ca2ff2ab92c4893495e7a721be902c40/addons/stock/models/stock_quant.py#L923-L925
This leads to the reservation quantity being min(15, 48) = 15
https://github.com/odoo/odoo/blob/5e458236ca2ff2ab92c4893495e7a721be902c40/addons/stock/models/stock_quant.py#L927
-----
Ticket:
opw-5974333
Forward-Port-Of: odoo/odoo#263934
Forward-Port-Of: odoo/odoo#257342This 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, improving payroll accuracy and compliance.
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#107601This update fixes an issue where packaging unit information was hidden on delivery slips after a transfer was validated for products tracked by serial/lot. The change ensures that the correct packaging unit and quantity are consistently displayed, providing more accurate reporting for inventory movements. This improves visibility and accuracy in stock management.
Original PR description
Issue before this commit: ========================= For products tracked by serial/lot with packaging units, the delivery slip correctly shows the packaging unit and quantity before validating the…
Issue before this commit: ========================= For products tracked by serial/lot with packaging units, the delivery slip correctly shows the packaging unit and quantity before validating the transfer. However, after validating the transfer, the packaging unit and its corresponding quantity are no longer displayed in the delivery slip report. Steps to Reproduce: ========================= 1. Install stock and sale_management modules. 2. Enable Units of Measure & Packagings and Display Lots & Serial Numbers on Delivery Slips from settings. 3. Create a product with tracking by lot/serial number and configure a packaging unit. 4. Create a SO using this product with a packaging unit and confirm it. 5. Open the related transfer and print the delivery slip before and after validation. Cause of the Issue: ========================= The delivery slip report template (stock_report_delivery_has_serial_move_line) does not display packaging unit information after validation for move lines when the packaging unit differs from the product unit of measure. With This Commit: ========================= This commit ensures that packaging units and their corresponding quantities are displayed on the delivery slip after validation when the packaging unit differs from the product unit of measure. Steps To Reporduce: [Video Link](https://drive.google.com/file/d/10DmFKW1Y_Tm-AyKzPrqtFMY8orBkKbIm/view?usp=sharing) opw-6142052 Forward-Port-Of: odoo/odoo#266028 Forward-Port-Of: odoo/odoo#265206
This update fixes an issue where pension fund taxes weren't being correctly applied when importing Italian electronic vendor bills. The change ensures that the system now accurately processes invoices generated by third-party software, even if they don't include all the expected XML tags, guaranteeing accurate tax calculations for Italian businesses.
Original PR description
### Issue before this commit: When importing an Italian electronic vendor bill using the AssoSoftware standard, pension fund taxes (Cassa Previdenziale) are not applied to the invoice lines. ###…
### Issue before this commit: When importing an Italian electronic vendor bill using the AssoSoftware standard, pension fund taxes (Cassa Previdenziale) are not applied to the invoice lines. ### Steps to reproduce the issue: 1. Download Accounting and l10n_it_edi_witholding 2. Change VAT number of IT company with the one in the xml 3. Go to Taxes > 4%F.Pens. > Advanced Options and change Pension Fund Type with TC02 4. Import xml of the ticket in vendor bills 5. P.Fund tax is not assigned ### Cause of the issue: The issue is caused by the following line: https://github.com/odoo/odoo/blob/669b9b84f4d5c8765dc4b451d5da6a95dbb9ded8/addons/l10n_it_edi_withholding/models/account_move.py#L247 Currently, the parser strictly expects the optional <RiferimentoTesto> tag alongside <TipoDato>AswCassPre</TipoDato>. However, several third-party software providers generate valid XML files containing only the AswCassPre block without any optional child tags. ### Reason to introduce the fix: Ensure that the pension fund tax mapped to the line's VAT rate is correctly applied whenever the AswCassPre data type is present, even if the optional reference tags are omitted. opw-6189225 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265914 Forward-Port-Of: odoo/odoo#264083
This update corrects a bug where the Gantt view incorrectly displayed working hours for flexible employees on public holidays. The fix ensures that unavailable time is accurately reflected, preventing employees from scheduling work during holiday periods. The issue stemmed from timezone discrepancies during the calculation of employee availability.
Original PR description
[FIX] hr_attendance_gantt: fix gantt view with public holidays Bug reproduction: 1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026 2 -…
[FIX] hr_attendance_gantt: fix gantt view with public holidays
Bug reproduction:
1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026
2 - Create a new public holiday on 01/01/2026 (from 00.00 to 23.59 or 23.55 (depends on version, it does not matter))
3 - in attendance app the cell from 00.00 to 01.00 seems white for that day and for selected employee (this cell seems like not holiday and employee can work)
Bug cause:
1 - After a long traceback, _gantt_unavailability in hr_attendance_gantt/HrAttendance, if an employee is flexible then unavailable_intervals is calculated with the Brussel time zone
2 - All other unavailable intervals are converted to the UTC in the function of _gantt_unavailability except in the final lines of the function.
3 - When the employee is flexible and since the conversion is not done in the final lines, it remains 1 hour more (UTC+1), it is from 1 am to 1 am of next day instead of 0 am to 23.59.
Bug solution:
1 - I converted the timezone to UTC to solve the problem.
task - 6067070
Forward-Port-Of: odoo/enterprise#112493This update optimizes a key stock query that previously performed very slowly due to complex string comparisons. By replacing these comparisons with a more efficient method of checking location ancestry, the query now runs significantly faster, especially when dealing with large lists of locations. This improves overall system responsiveness and reduces potential delays in stock management operations.
Original PR description
### Description of the issue/feature this PR addresses: Some stock queries determine whether a location belongs to the subtree of a set of locations by checking the parent_path prefix against…
### Description of the issue/feature this PR addresses:
Some stock queries determine whether a location belongs to the subtree of a set of locations by checking the parent_path prefix against candidate parent locations. This is done using a correlated EXISTS subquery with a LIKE parent.parent_path || '%' condition.
When the list of candidate locations becomes large (for example tens or hundreds of thousands of ids), this approach causes extremely poor performance because the database must repeatedly compare hierarchical path strings for every candidate row.
This PR improves the performance of this ancestry check by replacing the string prefix comparison with a direct check on the ancestor ids contained in parent_path.
### Current behavior before PR:
The query determines whether a location belongs to the subtree of one of the provided locations using:
location.parent_path LIKE parent.parent_path || '%'
For each row, PostgreSQL must evaluate a correlated subquery against all candidate parent locations. Because this relies on string prefix comparisons on parent_path, when the location list is large, this results in extremely slow queries.
### Desired behavior after PR is merged:
Instead of performing string prefix comparisons, the query extracts the ancestor ids directly from parent_path.
The path is:
1. Trimmed to remove leading and trailing /
2. Split into an array of ancestor ids
3. Expanded using unnest
4. Checked for intersection with the provided location ids
This converts the ancestry check from repeated string comparisons into a simple integer membership check.
### Benchmarks
Comparing performance of old subquery:
```
SELECT stock_location_inner.id
FROM stock_location AS stock_location_inner
WHERE EXISTS (
SELECT 1
FROM stock_location parent
WHERE parent.id IN (long list)
AND stock_location_inner.parent_path LIKE parent.parent_path || '%%'
);
```
to new one:
```
SELECT stock_location_inner.id
FROM stock_location AS stock_location_inner
WHERE EXISTS (
SELECT 1
FROM unnest(
string_to_array(trim(both '/' FROM stock_location_inner.parent_path), '/')::int[]
) AS path_id(id)
WHERE path_id.id IN (long list)
);
```
Depending on the number of elements in 'long list'
| # of elements | Before | After |
| --- |---|---|
| 130,000 | 21min | 0.8sec |
| 10,000 | 95sec | 0.5sec |
| 1,000 | 10.5sec | 0.5sec |
In practice, on the reference ticket this causes the "Validate" button on a stock picking to go from timing out to taking 8 seconds.
### Reference
opw-5932436
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#255399
Forward-Port-Of: odoo/odoo#254245This update fixes an issue where employees with time off were incorrectly checked out after their scheduled work hours. The change ensures that the system accurately calculates expected attendance based on employee contracts and time off, preventing over-reporting of hours worked. This improves the accuracy of time tracking and payroll.
Original PR description
# Steps to reproduce 1. Set the Working schedule 40h/week 2. Employee takes 2 hours off from 15:00 to 17:00 and enable automatic check-out 3. Odoo will automatically checks out at 17:06 (scheduled end + tolerance) # Issue - This leads to 2h06 of extra hours being incorrectly recorded. # Fix - Use employee._get_expected_attendances instead, so contract-aware calendar resolution, leaves, and break time handling stay centralized in HR. task-5052044 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235442
This update resolves an error occurring when sending purchase bills with agricultural tax (ClaveRegimenIvaOpTrascendencia) through the TicketBAI system in Spain. The issue stemmed from an incorrect value being submitted, preventing proper invoice processing. This fix ensures accurate transmission of tax information.
Original PR description
…hase bills **STEP TO REPRODUCE** 1. Create a bill with a invoice line with a regimen agricultura tax. 2. send the bill using TicketBAI. 3. You will get the following error: Error:cvc-enumeration-valid: Value '19' is not facet-valid with respect to enumeration '[01, 02, 03, 04, 05, 06, 07, 08, 09, 12, 13]'. It must be a value from the enumeration. opw-6200686 Forward-Port-Of: odoo/odoo#265785 Forward-Port-Of: odoo/odoo#264037
This update resolves an issue where users on Android 14 couldn't access their device's camera when uploading images through the Odoo web interface. The fix adds support for camera access, ensuring users can select photos directly from their device. This improves usability for Android users.
Original PR description
Since Android 14 we don't have option to take a photo on clicking on file input in Chrome.
This for example will allow only images but no option "Camera"
```html
<input type="file" accept="image/*/>
```
A workaround is to use a dummy mimetype (`*/*`), example `dummy/allowAndroidCamera` The fix will be applied on image widget in addition to the original `acceptedFileExtensions` to not override the existing `accept` attribute
You can test the different behaviour here: https://jsfiddle.net/n0vs6h3b/
Linked url
https://blog.addpipe.com/html-file-input-accept-video-camera-option-is-missing-android-14-15/ https://stackoverflow.com/questions/77876374/html-input-type-file-not-working-to-pull-up-camera-for-pixel-android-14-comb/79163998#79163998 https://issues.chromium.org/issues/40937303
opw-6040375
Forward-Port-Of: odoo/odoo#265944
Forward-Port-Of: odoo/odoo#265750This update fixes an issue where applying a combo to an order that had already been processed would cause the original order items to reappear after a page refresh. The fix ensures that the order is synchronized with the backend after a combo is applied, providing a consistent and accurate view for the user.
Original PR description
Steps to reproduce: - Make an order that could be a combo - Send the order to preparation - Apply the combo - Refresh page => A new combo appears and the original orderlines are still there. Issue: When applying a combo to an order that has already been sent to the backend it is not synched with the backend so when you refresh the original orderlines are fetched from the backend. Fix: If the orderlines have been sent to the backend sync the order after applying the combo. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261294
This update corrects a previous issue where product manufacturing quantities were incorrectly using planned amounts instead of actual production. Now, Odoo accurately reflects the real quantity of products that have been made, leading to more precise inventory management and reporting. This ensures better data for decision-making.
Original PR description
* Before: the manufactured quantity on product use the planned quantity * After: Use actual produced quantity Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265550 Forward-Port-Of: odoo/odoo#261438
This update fixes an issue where the search dropdown on the /shop page was partially hidden behind snippet blocks. The fix ensures the full search results are displayed correctly, improving the user experience for browsing products. This was achieved by adjusting how the website handles overlapping content.
Original PR description
On /shop, when a snippet block sits above the searchbar, the search dropdown was rendered partially hidden behind that block (cropped/unreadable items). Steps to reproduce: =================== 1. Go…
On /shop, when a snippet block sits above the searchbar, the search dropdown was rendered partially hidden behind that block (cropped/unreadable items). Steps to reproduce: =================== 1. Go to /shop. 2. Add a snippet block above the searchbar. 3. Type in the searchbar. => Observed: search results appear cropped, with upper items hidden behind the snippet block above. Root cause: =========== the products grid column (`#products_grid`) has `overflow: auto`, https://github.com/odoo/odoo/blob/d9bb1c1dc90f97b63b87ad762fc4ab36abf7e05f/addons/website_sale/static/src/scss/website_sale.scss#L442 which clips any absolutely-positioned descendant that extends past its bounds. The dropdown's containing block is the searchbar `<form>` (position: relative), which lives inside that column. When the dropdown grew (or flipped to dropup) and extended outside the column, the part outside was clipped, and any positioned snippet siblings above the column painted over the clipped area. Fix: ====== while the dropdown is mounted, lift the `overflow: auto` on its ancestor `div.col` so the menu can extend past the column and paint on top of other content. Done from JS so no SCSS rule has to target the searchbar-specific column. opw-6216317 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265982 Forward-Port-Of: odoo/odoo#265558
This update fixes a bug where users could order unlimited quantities of rental products. The change limits the available quantity to the minimum rental availability, ensuring accurate resource allocation and preventing overbooking. This improves the reliability of our rental service.
Original PR description
It is possible to order as many products as we want of a rental product that synchronizes shifts depending on a specific service Steps to reproduce: 1. Install website_sale_renting_planning module 2.…
It is possible to order as many products as we want of a rental product that synchronizes shifts depending on a specific service Steps to reproduce: 1. Install website_sale_renting_planning module 2. Go to Rental > Products and create a new product "test" with Sales enabled, Product Type "Service", Plan Services enabled as "Developer", in the Sales tab, enable Is Published and in the Rental prices tab, create a pricing for Daily period 3. In the General Information tab, click on the internal link to "Developer" 4. Enable Sync Shifts and Rental Orders 5. Go to the eCommerce website and search for product "test" 6. You can add as many quantity of the product to your cart Issue: We don't limit the maximum quantity of the product Solution: Look through the renting availabilities of the product and set the maximum quantity to the minimum of the availabilities relevant to the renting dates selected opw-6009928 Forward-Port-Of: odoo/enterprise#113525 Forward-Port-Of: odoo/enterprise#111793
This update resolves an issue where the timesheet timer wouldn't function when accessed from a subtask. The fix ensures the timer correctly opens and pre-fills with the subtask's project details, preventing a 'missing record' error. This improves usability for users managing tasks and subtasks.
Original PR description
**Problem:** Clicking the timesheet timer in the systray while viewing a subtask raises a MissingError, preventing the user from starting the timer. **Steps to reproduce:** 1. Open a project task…
**Problem:** Clicking the timesheet timer in the systray while viewing a subtask raises a MissingError, preventing the user from starting the timer. **Steps to reproduce:** 1. Open a project task that has subtasks 2. Click the subtasks smart button and open a subtask 3. Click the timesheet timer icon in the systray 4. Observe the "missing record" error **Current behavior:** The systray RPC fails with MissingError. **Expected behavior:** The timer opens, with the subtask's project and task prefilled. **Cause of the issue:** The frontend sends `currentState.active_id` regardless of the model it refers to. When the user navigates to a subtask via the smart button, `active_id` is the parent task's id. The systray controller then does `request.env['project.project'].browse(active_id)`, which returns a truthy recordset for an id that does not exist in `project_project`. Reading `.allow_timesheets` on that recordset triggers the DB fetch and raises MissingError. The same pattern exists in the `helpdesk_timesheet` override for both the `project.task` and `helpdesk.ticket` branches. **Fix:** Adding `.exists()` after the browse validates the recordset before any field access, so a stray `active_id` falls through to the task's own project (or ticket's project) instead of crashing. opw-6169548 Forward-Port-Of: odoo/enterprise#117039
This update corrects a bug where certain quality control test types were incorrectly visible during work order creation. The change ensures these test types are only accessible for manufacturing operations, improving data accuracy and preventing misconfiguration. This was caused by an optimization in Odoo's domain filtering.
Original PR description
### Issue: The `Print Label`, `Register Production`, `Register By-products`and `Register Consumed Materials` are all available in the test types at control point creation. ### Expected behavior:…
### Issue:
The `Print Label`, `Register Production`, `Register By-products`and `Register Consumed Materials` are all available in the test types at control point creation.
### Expected behavior:
These test types are only meant for manufacturing operations and are supposed to be hidden by the field domain:
https://github.com/odoo/enterprise/blob/f56aa85b4ad32c5d9ad5593df1366d72e88da0e4/mrp_workorder/models/quality.py#L102-L104 https://github.com/odoo/enterprise/blob/00d6cccd75c402378698a6fd11ee2692f2361c7f/mrp_workorder/models/quality.py#L20-L24
### Cause of the issue:
Since saas-18.1: 5ef007a2116e528b796ebe80fb291ba5f1a94c8f domains are optimised into equivalents SQL clause with better sql performances. This optimization results in the following match for boolean fields:
`('field', '=', True)` -> `('field', 'in', OrderedSet([True]))`
`('field', '=', False)` -> `('field', ' not in', OrderedSet([True]))`
Because of these:
https://github.com/odoo/odoo/blob/82b16e8feb3d60a9a3855e3adb3164ae5a6c041d/odoo/orm/domains.py#L1058-L1079 https://github.com/odoo/odoo/blob/82b16e8feb3d60a9a3855e3adb3164ae5a6c041d/odoo/orm/domains.py#L1215-L1236
Now the issue is that the specific `search_method` of the `allow_registration` field is then called with this optimized domain: https://github.com/odoo/odoo/blob/82b16e8feb3d60a9a3855e3adb3164ae5a6c041d/odoo/orm/domains.py#L860-L866 https://github.com/odoo/enterprise/blob/00d6cccd75c402378698a6fd11ee2692f2361c7f/mrp_workorder/models/quality.py#L20-L24
And since `value` is defined as a non empty ordered set in both cases it the search method returns a True leaf as search domain.
opw-5915197
Forward-Port-Of: odoo/enterprise#118073
Forward-Port-Of: odoo/enterprise#117068This update fixes an error in how overtime hours are calculated for employees with flexible work schedules. Previously, the system incorrectly generated extra hours, now it accurately reflects the employee's scheduled hours and overtime rules. This ensures accurate overtime payments for flexible staff.
Original PR description
__ ## Short functional explanation of the error When setting attendances on several consecutive days for a flexible employee, with an overtime ruleset containing a single rule. This rule being based…
__ ## Short functional explanation of the error When setting attendances on several consecutive days for a flexible employee, with an overtime ruleset containing a single rule. This rule being based on week and quantity. When regenerating overtimes for this ruleset, the overtime hours generated isn't correct. ## Reproduction Steps 1. Create an employee. In the Payroll tab, set a start date for their contract. Set Work Entry Source as Attendances. Set their Working Hours as a flexible schedule. Set their weekly hours at 40. 2. Create an Overtime Ruleset. Add a single rule, based on Quantity, if the worked hours on a `Week` differs `from the amount defined on the contract`. Check Pay Extra Hours and leave the Work Entry Type to use as Overtime Hours. 3. Go back to the employee. In Settings, set the Overtime Ruleset field as the new Overtime Ruleset you just created. 4. Create 5 attendances, each from 8 am to 6 pm, from Monday to Friday. 5. Go to the Overtime Ruleset you just created and click on Regenerate Overtimes. 6. Go back to Attendances. Search for your employee, and click on the list view. ### Expected behavior The employee's schedule is 40 hours per week. They worked 50 hours. 10 hours should be considered as Worked Extra Hours. ### Unexpected behavior 18 hours are considered as extra hours. ## Origin of the issue To compute the expected duration of the day, we run: https://github.com/odoo/odoo/blob/7fc5edc29f854d619dbcb5fcc3503fb18ca05335/addons/hr_attendance/models/hr_attendance_overtime_rule.py#L303-L304 where `schedule['work']` will contain intervals on 5 consecutive days, from 8 am to 4 pm. However, the last day of the employee's attendances isn't contained in these intervals. As a result, `period_schedule` will contain 4 days (the common days between the employee's Attendance days and `schedule['work']` ) and thus, `expected_duration` will be set at 36 hours instead of 40. In the case where overtimes are computed based on hours from the contract, for flexible employees, the expected hours are the ones indicated on their schedule. __ opw-6131543 Forward-Port-Of: odoo/odoo#265120 Forward-Port-Of: odoo/odoo#263335
This update resolves a problem where Xrechnung invoices generated in Odoo were failing validation checks used by some German clients. The issue stemmed from incorrect PDF formatting, preventing the invoices from meeting required standards. This fix ensures Odoo invoices comply with German client validation requirements.
Original PR description
**PROBLEM** xrechnung pdf invoices are not compliant with some validators used german clients. **STEP TO REPRODUCE** 1. Create an invoice for a german customer. 2. Set the edi format on the customer as Xrechnung. 3. Download the invoice pdf, and verify it on https://www.portinvoice.com/ 4. Notice the pdf is not valid. To verify my fix works, you need to have the fontTools python package installed (for pdfa conversion). opw-6030481 Forward-Port-Of: odoo/odoo#259318
18 changes
Resolved issues and error corrections
This update optimizes a key query used in Point of Sale reporting, resulting in a significant speed increase. By adding the journal to the search criteria, the system now efficiently utilizes database indexes, dramatically reducing the time it takes to retrieve account move information. This translates to faster report generation and a better user experience.
Original PR description
Currently the query to get the closing difference account move is done by searching for the reference of the move, which is not very efficient. This commit optimizes this query by adding the journal…
Currently the query to get the closing difference account move is done by searching for the reference of the move, which is not very efficient. This commit optimizes this query by adding the journal to the search criteria, which allows us to benefit from the index on the journal_id field. Here is an example of the before after on a database with 39 million account_move records. Meanwhile only 10-20K account_move are linked to specific journals used in POS payment methods. All measures are performed with a warmed up cache [Explain Before](https://explain.dalibo.com/plan/h8edf56c09d7dfd7) ### Benchmark: <table> <thead> <tr> <th># of am</th> <th>Before</th> <th>After</th> </tr> </thead> <tbody> <tr> <td>38982635</td> <td>~17s</td> <td>~22ms</td> </tr> </tbody> </table> [Explain After](https://explain.dalibo.com/plan/be2397f176a6b29d) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262148
This update resolves an issue where constant fields within signing documents would become empty during the signing process, leading to signing failures. The fix ensures that default field values are retained when auto-field calculations result in empty strings, guaranteeing required fields are populated and the signing flow completes successfully.
Original PR description
Version: - saas-18.4 Steps to reproduce: - Create sign template. - Add a sign item with read only true and linked model and auto_value field set. - Send document for signing. - Try to sign the document. Issue: - Signing fails with "Some required items are not filled". - Constant readonly fields become empty during signing flow. Cause: - In `_populate_constant_items()`, the default field value was always replaced by `_get_auto_field_value()`. - When no reference document was set, `_get_auto_field_value() `returned an empty string. - This caused an empty value to be stored in `sign.request.item.value`. Solution: - Keep the default field value when auto-field resolution returns an empty string. - Only replace the value when a valid auto-field value is found. task-6229776 Forward-Port-Of: odoo/enterprise#118240 Forward-Port-Of: odoo/enterprise#117880
This update resolves an error that prevented rental orders from being confirmed in older versions of Odoo Enterprise. The fix avoids a division-by-zero error that occurred when calculating quantities, ensuring rental orders can be processed correctly. This improves the reliability of the rental order functionality.
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
This update fixes an issue where the picking origin document incorrectly referenced the old MO name after a manufacturing operation type was changed before confirmation. The fix ensures that the picking origin now accurately reflects the updated MO name, improving inventory accuracy and reducing potential order fulfillment errors. This was triggered by a multi-step manufacturing route.
Original PR description
**Issue**: When the name of a MO changes before confirmation, the picking origin may remain incorrect after confirmation. **Steps to reproduce**: - Make sure that multi-step route is enabled in the…
**Issue**: When the name of a MO changes before confirmation, the picking origin may remain incorrect after confirmation. **Steps to reproduce**: - Make sure that multi-step route is enabled in the settings - Configure the manufacturing route as 2-step - Go to Inventory > Configuration > Warehouse Management > Operations Types - Clone the "Manufacturing" operation type and assign a different Sequence Prefix - Create and save a MO, without confirming it - Change and save the operation type to the cloned one (the MO name changes) - Confirm the MO -> The picking source document uses the previous MO name instead of the new one **Cause**: The source document of the picking (`origin`) comes from its move: https://github.com/odoo/odoo/blob/95c73aa4dd7433f394799fdaaad57a84d750ec5a/addons/stock/models/stock_move.py#L1526 The move origin comes from the procurement values: https://github.com/odoo/odoo/blob/95c73aa4dd7433f394799fdaaad57a84d750ec5a/addons/stock/models/stock_move.py#L1575C13-L1575C56 Which relies on `self.reference_ids[0].name`: https://github.com/odoo/odoo/blob/95c73aa4dd7433f394799fdaaad57a84d750ec5a/addons/stock/models/stock_move.py#L1639 which is never updated, causing the origin to keep the previous MO name. opw-5979778 Forward-Port-Of: odoo/odoo#255874
This update fixes an error in the project dashboard that was miscalculating revenue figures for yearly subscriptions. The previous system incorrectly applied monthly recurring charges, leading to inaccurate displayed amounts. This change ensures revenue is accurately reflected based on the correct subscription type.
Original PR description
__ ## Short functional explanation of the error When checking the dashboard on a project we created with a yearly subscription, the values shown are incorrect. ## Reproduction Steps 1. Create a new…
__ ## Short functional explanation of the error When checking the dashboard on a project we created with a yearly subscription, the values shown are incorrect. ## Reproduction Steps 1. Create a new product. Check the Subscription field and set the Product type as Service. On the Create on Order field, set Project & Task. Then, in the Recurring Price tab, add a Monthly plan with price 50 and yearly plan with price 40. 2. Create a new Quotation. Set a customer and add the product you just created in an Order line. Set the Quantity to 100 and set the recurring plan as Yearly. You'll see the amount be at 4000, and the total amount at 4600 with taxes. Click on Confirm. 3. Create an invoice and confirm it. 4. Click on the Project smart button. Then, on the top right, click on the view menu > Top Menu. Select Dashboard and click on it. ### Expected behavior On the dashboard, we should see the Revenues under Profitability at 4000. To invoice should be left at 0 and Invoiced should be at 4000. Expected should be at 4000. ### Unexpected behavior On the dashboard, To Invoice is at 333, and Expected is at 4333. This corresponds to our invoice + 4000/12 -> monthly recurring plan, with the price of the yearly plan! ## Origin of the issue We always add the `recurring_monthly` value when showing the profitability, no matter the recurring plan: https://github.com/odoo/enterprise/blob/cdc0d5d57f6b27a6bb5e451d48bdbef4e3dde5cb/project_sale_subscription/models/project_project.py#L86 We should only add the `recurring_monthly` value for as many monthly subscriptions we have, not for *all* the subscriptions. __ opw-5916688 Forward-Port-Of: odoo/enterprise#117818 Forward-Port-Of: odoo/enterprise#113918
This update resolves an issue where users on Android 14 couldn't access their device's camera when uploading images through the Odoo web interface. The fix adds support for camera access, ensuring users can select photos directly from their device. This improves usability for Android users.
Original PR description
Since Android 14 we don't have option to take a photo on clicking on file input in Chrome.
This for example will allow only images but no option "Camera"
```html
<input type="file" accept="image/*/>
```
A workaround is to use a dummy mimetype (`*/*`), example `dummy/allowAndroidCamera` The fix will be applied on image widget in addition to the original `acceptedFileExtensions` to not override the existing `accept` attribute
You can test the different behaviour here: https://jsfiddle.net/n0vs6h3b/
Linked url
https://blog.addpipe.com/html-file-input-accept-video-camera-option-is-missing-android-14-15/ https://stackoverflow.com/questions/77876374/html-input-type-file-not-working-to-pull-up-camera-for-pixel-android-14-comb/79163998#79163998 https://issues.chromium.org/issues/40937303
opw-6040375
Forward-Port-Of: odoo/odoo#265944
Forward-Port-Of: odoo/odoo#265750This update fixes an issue where pension fund taxes weren't being correctly applied when importing Italian electronic vendor bills. The change ensures that the system accurately processes invoices generated by third-party software, even if they don't include all the expected XML tags, guaranteeing accurate tax calculations for Italian businesses.
Original PR description
### Issue before this commit: When importing an Italian electronic vendor bill using the AssoSoftware standard, pension fund taxes (Cassa Previdenziale) are not applied to the invoice lines. ###…
### Issue before this commit: When importing an Italian electronic vendor bill using the AssoSoftware standard, pension fund taxes (Cassa Previdenziale) are not applied to the invoice lines. ### Steps to reproduce the issue: 1. Download Accounting and l10n_it_edi_witholding 2. Change VAT number of IT company with the one in the xml 3. Go to Taxes > 4%F.Pens. > Advanced Options and change Pension Fund Type with TC02 4. Import xml of the ticket in vendor bills 5. P.Fund tax is not assigned ### Cause of the issue: The issue is caused by the following line: https://github.com/odoo/odoo/blob/669b9b84f4d5c8765dc4b451d5da6a95dbb9ded8/addons/l10n_it_edi_withholding/models/account_move.py#L247 Currently, the parser strictly expects the optional <RiferimentoTesto> tag alongside <TipoDato>AswCassPre</TipoDato>. However, several third-party software providers generate valid XML files containing only the AswCassPre block without any optional child tags. ### Reason to introduce the fix: Ensure that the pension fund tax mapped to the line's VAT rate is correctly applied whenever the AswCassPre data type is present, even if the optional reference tags are omitted. opw-6189225 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265914 Forward-Port-Of: odoo/odoo#264083
This update fixes inaccuracies in how the Mexican employment subsidy was calculated, specifically addressing issues with threshold prorating and monthly caps. The changes ensure employees receive the correct subsidy amounts based on updated government regulations, improving payroll accuracy and compliance.
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 `test_subsidy_weekly`:
This test covers 5 weekly payslips with the following subsidy distribution:
- First payslip (Apr 29 - May 5), the subsidy is 35.24 for April and 88.10 for May.
- 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
- 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#116298
Forward-Port-Of: odoo/enterprise#107601This update resolves an error occurring when generating invoices with agricultural tax (Regimen Agricultura) using the TicketBAI system. The issue stemmed from an incorrect value being submitted for a tax code, preventing proper invoice processing. This fix ensures accurate invoice generation for customers using this tax regime.
Original PR description
…hase bills **STEP TO REPRODUCE** 1. Create a bill with a invoice line with a regimen agricultura tax. 2. send the bill using TicketBAI. 3. You will get the following error: Error:cvc-enumeration-valid: Value '19' is not facet-valid with respect to enumeration '[01, 02, 03, 04, 05, 06, 07, 08, 09, 12, 13]'. It must be a value from the enumeration. opw-6200686 Forward-Port-Of: odoo/odoo#265785 Forward-Port-Of: odoo/odoo#264037
This update fixes an issue where the 'import emissions' action within the ESG module wasn't appearing in the COG menu. The fix allows the import action to function correctly, even with a restricted 'create' attribute in the list view, ensuring users can easily access and utilize the ESG emissions reporting feature.
Original PR description
Before this commit, the "import" action of emissions in the ESG module was not visible in the COG menu. It is because the "create" attribute of the list view is disabled, which prevents the menu item from being displayed. With this commit, we override the standard behavior in this particular action, by allowing the import action to show up in the COG menu, even if the "create" attribute is disabled. version-19.1 Forward-Port-Of: odoo/enterprise#118004
This update optimizes a key stock query that was causing slow performance due to repeated string comparisons. By using a more efficient method to identify location ancestry, the query now runs significantly faster, especially when dealing with large lists of locations. This improves overall system responsiveness.
Original PR description
### Description of the issue/feature this PR addresses: Some stock queries determine whether a location belongs to the subtree of a set of locations by checking the parent_path prefix against…
### Description of the issue/feature this PR addresses:
Some stock queries determine whether a location belongs to the subtree of a set of locations by checking the parent_path prefix against candidate parent locations. This is done using a correlated EXISTS subquery with a LIKE parent.parent_path || '%' condition.
When the list of candidate locations becomes large (for example tens or hundreds of thousands of ids), this approach causes extremely poor performance because the database must repeatedly compare hierarchical path strings for every candidate row.
This PR improves the performance of this ancestry check by replacing the string prefix comparison with a direct check on the ancestor ids contained in parent_path.
### Current behavior before PR:
The query determines whether a location belongs to the subtree of one of the provided locations using:
location.parent_path LIKE parent.parent_path || '%'
For each row, PostgreSQL must evaluate a correlated subquery against all candidate parent locations. Because this relies on string prefix comparisons on parent_path, when the location list is large, this results in extremely slow queries.
### Desired behavior after PR is merged:
Instead of performing string prefix comparisons, the query extracts the ancestor ids directly from parent_path.
The path is:
1. Trimmed to remove leading and trailing /
2. Split into an array of ancestor ids
3. Expanded using unnest
4. Checked for intersection with the provided location ids
This converts the ancestry check from repeated string comparisons into a simple integer membership check.
### Benchmarks
Comparing performance of old subquery:
```
SELECT stock_location_inner.id
FROM stock_location AS stock_location_inner
WHERE EXISTS (
SELECT 1
FROM stock_location parent
WHERE parent.id IN (long list)
AND stock_location_inner.parent_path LIKE parent.parent_path || '%%'
);
```
to new one:
```
SELECT stock_location_inner.id
FROM stock_location AS stock_location_inner
WHERE EXISTS (
SELECT 1
FROM unnest(
string_to_array(trim(both '/' FROM stock_location_inner.parent_path), '/')::int[]
) AS path_id(id)
WHERE path_id.id IN (long list)
);
```
Depending on the number of elements in 'long list'
| # of elements | Before | After |
| --- |---|---|
| 130,000 | 21min | 0.8sec |
| 10,000 | 95sec | 0.5sec |
| 1,000 | 10.5sec | 0.5sec |
In practice, on the reference ticket this causes the "Validate" button on a stock picking to go from timing out to taking 8 seconds.
### Reference
opw-5932436
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#255399
Forward-Port-Of: odoo/odoo#254245This update fixes an issue where automatic check-out was incorrectly adding extra hours to employee records when they took time off. The fix ensures that employee schedules, including time off and contracts, are accurately considered during the check-out process, preventing overpayment for hours worked.
Original PR description
# Steps to reproduce 1. Set the Working schedule 40h/week 2. Employee takes 2 hours off from 15:00 to 17:00 and enable automatic check-out 3. Odoo will automatically checks out at 17:06 (scheduled end + tolerance) # Issue - This leads to 2h06 of extra hours being incorrectly recorded. # Fix - Use employee._get_expected_attendances instead, so contract-aware calendar resolution, leaves, and break time handling stay centralized in HR. task-5052044 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235442
This update fixes an issue where applying a combo to an order that had already been processed would cause the original order items to reappear after a page refresh. The fix ensures that the order is synchronized with the backend after a combo is applied, providing a consistent and accurate view of the order for the user.
Original PR description
Steps to reproduce: - Make an order that could be a combo - Send the order to preparation - Apply the combo - Refresh page => A new combo appears and the original orderlines are still there. Issue: When applying a combo to an order that has already been sent to the backend it is not synched with the backend so when you refresh the original orderlines are fetched from the backend. Fix: If the orderlines have been sent to the backend sync the order after applying the combo. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261294
This update resolves an issue where Italian EDI bank account imports weren't automatically creating new bank accounts. The fix ensures that bank accounts are now created, assigned to the correct business partner, and initially marked as untrusted, streamlining the accounting process. This improves data accuracy and reduces manual effort for accountants.
Original PR description
The Italian EDI import didn't create new bank account by itself. IBAN info was just logged in the chatter, leaving it up for the accountant to create the bank account record. The bank account should be created and assigned to the corresponding commercial partner and set to not trusted yet. Enterprise PR: odoo/enterprise#112794 Task [link](https://www.odoo.com/odoo/project.task/6046189) task-6046189 Forward-Port-Of: odoo/odoo#264814 Forward-Port-Of: odoo/odoo#254505
This update fixes a bug that allowed users to order unlimited quantities of rental products through the website. The system now automatically limits the available quantity based on the product's rental availability, ensuring accurate stock management. This prevents over-ordering and improves the reliability of rental product orders.
Original PR description
It is possible to order as many products as we want of a rental product that synchronizes shifts depending on a specific service Steps to reproduce: 1. Install website_sale_renting_planning module 2.…
It is possible to order as many products as we want of a rental product that synchronizes shifts depending on a specific service Steps to reproduce: 1. Install website_sale_renting_planning module 2. Go to Rental > Products and create a new product "test" with Sales enabled, Product Type "Service", Plan Services enabled as "Developer", in the Sales tab, enable Is Published and in the Rental prices tab, create a pricing for Daily period 3. In the General Information tab, click on the internal link to "Developer" 4. Enable Sync Shifts and Rental Orders 5. Go to the eCommerce website and search for product "test" 6. You can add as many quantity of the product to your cart Issue: We don't limit the maximum quantity of the product Solution: Look through the renting availabilities of the product and set the maximum quantity to the minimum of the availabilities relevant to the renting dates selected opw-6009928 Forward-Port-Of: odoo/enterprise#113525 Forward-Port-Of: odoo/enterprise#111793
This update addresses critical Runbot errors impacting the POS Restaurant module, specifically related to order processing and refunds. The fix ensures smoother operations by handling missing order IDs, resolving refund synchronization issues, and improving the table closing tour, preventing disruptions to payment flows.
Original PR description
Runbot failed in three cases: taxGroupLabels could run while order_id was missing and crash on fiscal_position_id. During sync, is_refund on the order could disagree, so _askForPreparation showed the kitchen prompt on refund flows and blocked payment. The delete-line tour sometimes asserted before the table was closed; the tour now opens the plan again to close and sync tables. Safety fix: Optional chaining on order_id; Wait for sync refund for the preparation check; Explicit plan navigation in the tour. runbot error - 242601-242604
This update resolves a problem where custom attributes weren't correctly displayed in the Point of Sale kiosk mode. Specifically, when a product had a single custom attribute, the option to select it was hidden. The fix ensures that these attributes are now visible and functional within the kiosk experience, improving usability and order configuration.
Original PR description
this pr fixes 3 bug, as all are closely related. Step to reproduce (hide is_custom attr in kiosk mode): - have two attributes A and B - A has only 1 attribute value with is_custom = True - B can have…
this pr fixes 3 bug, as all are closely related. Step to reproduce (hide is_custom attr in kiosk mode): - have two attributes A and B - A has only 1 attribute value with is_custom = True - B can have any two value ( ex. gender: male/female) - use it on a product and make it available in POS for kiosk - start kiosk and open that product Observation: - we do not get option to select option from A but the heading is visible - when we select from B, Add to cart is disabled. Cause: - we do not allow attribute values with is_custom = True in kiosk - but we display the attribute regardless - the Add to cart btn depends on `selectedValues`, which requires value from each attribute, in this case, we are not seletion anything from A - so it is disabled Fix: - we introduced `attributesToDisplay` which will hide heading in case of single custom value for any attribute - for Add to cart, wenow do not expect value from `is_custom` attribute values. Allow product with 1 attr which is `is_custom` to be configurable in configs other than kiosk) correct fix for commit Step to reproduce - have attributes A - A has only 1 attribute value with is_custom = True - use it on a product and make it available in POS - start pos and open that product Observation: - we do not get option to select add text for A Cause: - in pos, we consider product to be configurable only it has more than 1 attributes, which misses is_custom attr Fix: - we backport commit[1] and also considers its side effect by introducing `isProductConfigurable` for pos_self_order, which will still avoid `is_custom` attrs for kiosk [1] https://github.com/odoo/odoo/commit/5155c77a03ed2ff6c914eac41cc81ccb34b1f3c7 Empty page is displayed if product has only `is_custom` attribute value and other attribute with type other then 'no_variant' for combo item Step to reproduce - have attributes A and B - A has only 1 attribute value with is_custom = True - B has two values with type "always" - use it on a product and add that product in combo item and make it available in Kisok - start kiosk and open that combo and select that product Observation: - we do not get option to select Cause: - `availableAttributeValue` only show `no_variant` and non `is_custom` attribute values in attributeSelection component. Fix: - before mounting Attributeselection component, we check if product has required attribute or not. opw-6100965 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265763 Forward-Port-Of: odoo/odoo#257880
This update corrects a technical issue where the FAIA report incorrectly referenced suppliers without matching supplier data. This ensures accurate reporting of financial information for the LU company, aligning with accounting standards. The fix resolves a validation error within the report generation process.
Original PR description
## Steps to reproduce: 1. Install `l10n_lu_reports`, swap to the LU company 2. Look at the partner Azure Interior. 1. They have no open balances on `asset_receivable` or `liability_payable` accounts.…
## Steps to reproduce:
1. Install `l10n_lu_reports`, swap to the LU company
2. Look at the partner Azure Interior.
1. They have no open balances on `asset_receivable` or `liability_payable` accounts.
2. Their `supplier_count` is higher than their `customer_count`.
3. Navigate to Accounting > Reporting > General Ledger.
4. Select the 2026 fiscal year.
5. Select gear > FAIA report.
6. Open the downloaded file. Notice:
1. Azure Interior is listed under /MasterFiles/Customers/Customer.
2. There are no /MasterFiles/Suppliers.
3. Azure Interior's ID (14 in this case) is referenced in a /SupplierID section.
7. Take a gander at the official XSD for LU [1]. The SupplierID must match an element in /MasterFiles/Suppliers.
Video: [2]
## Explanation
This is one of several errors found with the FAIA export. See PR #113316 for more.
It's possible to have a /SupplierID listed on a /Transaction/Line element but not have a /Suppliers/Supplier element that it refers to. This is not valid according to the FAIA report's schema [1].
This happens because /Transaction/Line and /MasterFiles use different criteria to determine if a partner is a Customer or a Supplier.
The element /Transaction/Line [3] determines this from the `partner_vals['type']` value [4]. This value is 'customer' or 'supplier' and is determined by comparing the ResPartner fields `customer_rank` and `supplier_rank`. In case of a tie, the partner is assigned as a 'supplier'.
The element /MasterFiles allows a partner to be both a Customer and a Supplier via `partner_vals['types']` [5]. Partners with an open `asset_receivable` balance at the start or end of the reporting period are listed as Customers [6]. Likewise, partners with an open `liability_payable` balance are listed as Suppliers [7]. If there are no open balances, partners are put in the Customer list by default.
The XSD validation error will not show up in a standard Runbot database because the namespace for the XSD is incorrect. If you manually fix the XSD namespace (`xmlns:doc` instead of `xmlns`) and use xmllint to check a generated XML against the XSD, it will raise the following error.
> No match found for key-sequence ['14'] of keyref 'RefGLTransactionLineSupplier'. Downloads/general_ledger (5).xml fails to validate
[1] https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip. I will note that there are three XSDs. Version A has a different namespace and appears to be more restrictive. The "full" XSD document does not raise these errors.
[2] https://drive.google.com/file/d/1xeULpCcGgZk-kYcCjBTKxcfv4ICYRzaB/view?usp=sharing
[3] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L244-L248
[4] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L299
[5] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L303-L309
[6] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L153
[7] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L173
opw-6107107
Forward-Port-Of: odoo/enterprise#11779921 changes
Resolved issues and error corrections
This update optimizes a key database query used in Point of Sale reporting, resulting in a significant speed improvement. By adding the journal to the search criteria, the system now efficiently utilizes an existing database index, dramatically reducing the time it takes to retrieve necessary data. This translates to faster reporting and a better user experience.
Original PR description
Currently the query to get the closing difference account move is done by searching for the reference of the move, which is not very efficient. This commit optimizes this query by adding the journal…
Currently the query to get the closing difference account move is done by searching for the reference of the move, which is not very efficient. This commit optimizes this query by adding the journal to the search criteria, which allows us to benefit from the index on the journal_id field. Here is an example of the before after on a database with 39 million account_move records. Meanwhile only 10-20K account_move are linked to specific journals used in POS payment methods. All measures are performed with a warmed up cache [Explain Before](https://explain.dalibo.com/plan/h8edf56c09d7dfd7) ### Benchmark: <table> <thead> <tr> <th># of am</th> <th>Before</th> <th>After</th> </tr> </thead> <tbody> <tr> <td>38982635</td> <td>~17s</td> <td>~22ms</td> </tr> </tbody> </table> [Explain After](https://explain.dalibo.com/plan/be2397f176a6b29d) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262148
This update resolves a bug in the HTML Editor that caused a crash when a user removed a table while resizing. The fix restricts resizing to the primary mouse button and prevents the editor from attempting to resize when there's no table to resize, improving stability and user experience.
Original PR description
#### Description of the issue this PR addresses: - Table resize listeners are not cleaned when the table is removed while resizing - Next mousemove runs resize logic with a null target and throws traceback #### Desired behavior after PR is merged: - Restrict resize start to primary mouse button only - Prevent resize logic execution on null targets #### Steps to reproduce: - Open the todo app - Insert a table and select whole table - Move cursor on a table cell border to see resize cursor - Right click and choose Cut from browser context menu - Move the mouse again - Resize logic crashes with null target traceback task-6212279 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264065
This update corrects a migration issue that occurred when certain tax IDs were missing for Maltese companies. The fix prevents a crash caused by attempting to combine a recordset with a missing tax record, ensuring the migration process completes successfully. This improves the reliability of tax data updates for Odoo users in Malta.
Original PR description
### Issue: During migration of Malta taxes, the script can fail when certain tax XML IDs are missing for a company. If the XML ID does not exist, `env.ref(..., raise_if_not_found=False)` returns…
### Issue:
During migration of Malta taxes, the script can fail when certain tax XML IDs are missing for a company. If the XML ID does not exist, `env.ref(..., raise_if_not_found=False)` returns None. Trying to combine a recordset with None causes the migration to fail. Due to recent [commit]
### Traceback:
```py
tax_7 |= env.ref(f'account.{company.id}_VAT_S_IN_MT_7_G', raise_if_not_found=False)
File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 6589, in __or__
return self.union(other)
File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 6603, in union
raise TypeError(f"unsupported operand types in: {self} | {arg!r}")
TypeError: unsupported operand types in: account.tax() | None
```
###
Solution:
Use a guard check with the walrus operator (:=) to assign and validate the tax record before union.
This ensures that only existing tax records are added to the recordset, preventing the crash.
Ticket [link1](https://www.odoo.com/odoo/project.task/6159300) [link2](https://www.odoo.com/odoo/project.task/6149387)
opw-6159300
opw-6149387
Forward-Port-Of: odoo/odoo#264327This update corrects an issue where delivery quantities weren't updating correctly after creating multiple production orders (MOs) using a multi-step route with batch sizes. The fix ensures that all MOs created during this process are properly linked to the delivery, guaranteeing accurate inventory updates upon validation. This resolves a discrepancy in how move destination IDs are handled during MO splitting.
Original PR description
### Steps to reproduce: - In the settings enable: Multi-steps routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with a bom using the MTO…
### Steps to reproduce: - In the settings enable: Multi-steps routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with a bom using the MTO Route - In the Miscellaneous tab of the bom tick Batch Size and set it to 2 - Create and confirm a sale order for 6 units of P #### > Three MO's are created but only the last one will update the quantities of the delivery at validation of the production. ### Cause of the issue: The `move_dest_ids` of the `move_finished_ids` is only set on the last of the three productions. That is only the last MO is properly chained to the delivery via an MTO chain. This happens because the `move_dest_ids` field of the `mrp.production` model is a `One2Many` field: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L223-L224 Which implies that each move can be linked to at most one mrp.production via the `created_production_id` field. However, if you have set a batch size on your bom, it is expected for a single move to create multiple mo's. While the `move_dest_ids` of each of these MO is appropriately set in the create vals to be the mto `stock.move` of the delivery, due to the nature of the `created_production_id` field only the *last* mo will created with a set `move_dest_ids` as this is the only record that will be set as `created_production_id`. However, after the creation of these MO's, the related `move_finished_ids` will be recomputed: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1089-L1093 However, the `move_dest_ids` of the created moves will be set to be either the `move_dest_ids` of their production (which is unset for all but the last one) or these of the first production of the same `production_group` that is these generated by a common production split: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1263-L1267 Now, since neither are set in our use case, the `move_dest_ids` will not be set on the `move_finished_ids` which implies in particular that the mto link between our productions (but the last one) and the delivery is lost. Fix: Since we can not change the nature of the `move_dest_ids` and `created_production_id` in stable to become Many2Many fields, we need to find a way to propagate the `move_dest_ids` on moves without relying on the probably inaccurate value provided by the production. And, since the compute of the `move_finished_ids` could be launched at many other points than during a create process (because of the many dependencies), we can not solely rely on the creation context but rather new to provide a way to recreate the link from relations at any given point. We therefore rely on the `stock.reference`'s similar to what was done prior to 19.0 via the `procurement_group_ids`: https://github.com/odoo/odoo/blob/132f042ca14012877f608783b57a0ca9c4e565f3/addons/mrp/models/mrp_production.py#L1198-L1202 opw-6188069 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264951
This update fixes an issue where the picking origin document incorrectly referenced the previous MO name after a manufacturing operation type was changed before confirmation. The fix ensures that the picking origin now accurately reflects the updated MO name, preventing data discrepancies in inventory management. This improves the reliability of stock movements.
Original PR description
**Issue**: When the name of a MO changes before confirmation, the picking origin may remain incorrect after confirmation. **Steps to reproduce**: - Make sure that multi-step route is enabled in the…
**Issue**: When the name of a MO changes before confirmation, the picking origin may remain incorrect after confirmation. **Steps to reproduce**: - Make sure that multi-step route is enabled in the settings - Configure the manufacturing route as 2-step - Go to Inventory > Configuration > Warehouse Management > Operations Types - Clone the "Manufacturing" operation type and assign a different Sequence Prefix - Create and save a MO, without confirming it - Change and save the operation type to the cloned one (the MO name changes) - Confirm the MO -> The picking source document uses the previous MO name instead of the new one **Cause**: The source document of the picking (`origin`) comes from its move: https://github.com/odoo/odoo/blob/95c73aa4dd7433f394799fdaaad57a84d750ec5a/addons/stock/models/stock_move.py#L1526 The move origin comes from the procurement values: https://github.com/odoo/odoo/blob/95c73aa4dd7433f394799fdaaad57a84d750ec5a/addons/stock/models/stock_move.py#L1575C13-L1575C56 Which relies on `self.reference_ids[0].name`: https://github.com/odoo/odoo/blob/95c73aa4dd7433f394799fdaaad57a84d750ec5a/addons/stock/models/stock_move.py#L1639 which is never updated, causing the origin to keep the previous MO name. opw-5979778 Forward-Port-Of: odoo/odoo#255874
This update fixes an issue where replenishment order quantities weren't being rounded correctly when using the same unit of measure as the product. Previously, orders would sometimes request an incorrect quantity. Now, replenishment quantities will always be rounded to the nearest whole unit, ensuring accurate stock levels and order fulfillment.
Original PR description
**Issue** Replenishment quantity is not rounded when the replenishment UoM is the same as the product UoM. **Steps to reproduce**: - Enable "Units of Measure & Packagings" setting - Create a tracked…
**Issue** Replenishment quantity is not rounded when the replenishment UoM is the same as the product UoM. **Steps to reproduce**: - Enable "Units of Measure & Packagings" setting - Create a tracked product and add a vendor using the same uom (ex: Unit) - Create a replenishment order rule: - min = 0 - max = 10 - multiple: Unit - Create a sale order for that product with 1.11 units -> It tries to replenish 11.11 units instead of 12 **Cause**: While computing `qty_to_order`, it rounds using the given multiple via `_get_multiple_rounded_qty`: https://github.com/odoo/odoo/blob/995629db3231de944710751c3184bf1b8b1355c7/addons/stock/models/stock_orderpoint.py#L471-L475 However, `_get_multiple_rounded_qty` skips rounding when the replenishment UoM matches the product UoM: https://github.com/odoo/odoo/blob/995629db3231de944710751c3184bf1b8b1355c7/addons/stock/models/stock_orderpoint.py#L802-L809 opw-[6015189](https://www.odoo.com/web#id=6015189&view_type=form&model=project.task) Forward-Port-Of: odoo/odoo#256006
This update resolves a bug where the Gantt view incorrectly displayed working hours for flexible employees during public holidays. The fix converts all time zone calculations to UTC, ensuring accurate representation of unavailable time slots. This prevents employees from being incorrectly scheduled to work during holiday periods.
Original PR description
[FIX] hr_attendance_gantt: fix gantt view with public holidays Bug reproduction: 1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026 2 -…
[FIX] hr_attendance_gantt: fix gantt view with public holidays
Bug reproduction:
1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026
2 - Create a new public holiday on 01/01/2026 (from 00.00 to 23.59 or 23.55 (depends on version, it does not matter))
3 - in attendance app the cell from 00.00 to 01.00 seems white for that day and for selected employee (this cell seems like not holiday and employee can work)
Bug cause:
1 - After a long traceback, _gantt_unavailability in hr_attendance_gantt/HrAttendance, if an employee is flexible then unavailable_intervals is calculated with the Brussel time zone
2 - All other unavailable intervals are converted to the UTC in the function of _gantt_unavailability except in the final lines of the function.
3 - When the employee is flexible and since the conversion is not done in the final lines, it remains 1 hour more (UTC+1), it is from 1 am to 1 am of next day instead of 0 am to 23.59.
Bug solution:
1 - I converted the timezone to UTC to solve the problem.
task - 6067070
Forward-Port-Of: odoo/enterprise#112493This update resolves an issue preventing users from correctly unreconciling SePA CT batch payments with a 'pending' online status. Previously, the system blocked this process, causing delays in bank statement reconciliation. The fix allows the internal unreconciliation flow to bypass validation, enabling accurate bank statement matching.
Original PR description
**Issue:** The account_online_payment module overrides `action_draft` to raise a UserError for sepa_ct payments belonging to a batch with a `payment_online_status` = 'pending' or 'accepted'. This…
**Issue:** The account_online_payment module overrides `action_draft` to raise a UserError for sepa_ct payments belonging to a batch with a `payment_online_status` = 'pending' or 'accepted'. This blocks the bank statement unreconciliation process. When `delete_reconciled_line` is called, it tries to set payments to draft and re-post them, despite it being an internal process not a manual user modification. **Steps to reproduce:** - Setup a 'sepa_ct' payment method on a bank journal. - Create a bill with a vendor with a trusted bank account. - Create a payment for that bill with a 'sepa_ct' payment method. - Add the payment to a batch. - Manually set the `payment_online_status` = 'pending'. - Create a bank transaction and reconcile it with the batch. - Try to unreconcile the lines on the transaction - Result: UserError 'You cannot modify a payment that has already been sent to the bank.' **Fix:** Pass a context flag to `action_draft` during the unreconciliation flow so that the validation is skipped when the call originates from the internal unreconcile flow. OPW-6080464 Forward-Port-Of: odoo/enterprise#117921
This update fixes an issue where Italian electronic vendor bills weren't correctly applying pension fund taxes (Cassa Previdenziale) during import. The change ensures that the system accurately processes invoices generated by third-party software, regardless of the presence of optional XML tags, guaranteeing correct tax calculations for Italian businesses.
Original PR description
### Issue before this commit: When importing an Italian electronic vendor bill using the AssoSoftware standard, pension fund taxes (Cassa Previdenziale) are not applied to the invoice lines. ###…
### Issue before this commit: When importing an Italian electronic vendor bill using the AssoSoftware standard, pension fund taxes (Cassa Previdenziale) are not applied to the invoice lines. ### Steps to reproduce the issue: 1. Download Accounting and l10n_it_edi_witholding 2. Change VAT number of IT company with the one in the xml 3. Go to Taxes > 4%F.Pens. > Advanced Options and change Pension Fund Type with TC02 4. Import xml of the ticket in vendor bills 5. P.Fund tax is not assigned ### Cause of the issue: The issue is caused by the following line: https://github.com/odoo/odoo/blob/669b9b84f4d5c8765dc4b451d5da6a95dbb9ded8/addons/l10n_it_edi_withholding/models/account_move.py#L247 Currently, the parser strictly expects the optional <RiferimentoTesto> tag alongside <TipoDato>AswCassPre</TipoDato>. However, several third-party software providers generate valid XML files containing only the AswCassPre block without any optional child tags. ### Reason to introduce the fix: Ensure that the pension fund tax mapped to the line's VAT rate is correctly applied whenever the AswCassPre data type is present, even if the optional reference tags are omitted. opw-6189225 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265914 Forward-Port-Of: odoo/odoo#264083
This update resolves a problem where invoices with year-range invoice numbers (e.g., INV/2025-2026/00001) were failing to send to MyInvois. The fix corrects a technical error in how the system processes these invoice numbers, ensuring accurate transmission of invoices.
Original PR description
Currently, an error is produced when sending invoices to MyInvois if the invoice number uses a year-range sequence. **Steps to Reproduce:(v-19.0)** 1. Install the `accountant` and `l10n_my_edi`…
Currently, an error is produced when sending invoices to MyInvois if the invoice number uses a year-range sequence. **Steps to Reproduce:(v-19.0)** 1. Install the `accountant` and `l10n_my_edi` modules (with demo data). 2. Switch to "MY Company"(Malaysian company). 3. Enable "_Quick Encoding_" for Customer Invoices in Settings. 4. Create a customer invoice with customer "_MY Company_", set a Malaysian classification code and taxes on the invoice line, and confirm the invoice. 5. Set the invoice back to Draft and modify the invoice number with a year-range sequence (e.g., INV/2025-2026/00001), then confirm it again. 6. Open the invoice list view and click **"Send to MyInvois"**. **Error:** `ValueError: not enough values to unpack (expected 4, got 2)` The `_get_sequence_date_range()` method on `myinvois.document` overrides the method from `sequence.mixin` and returns only two values from `date_utils.get_fiscal_year()`. However, it expects the method to return four values at [1]. [1] - https://github.com/odoo/odoo/blob/57b6b8d63b038ede32dfcc833c30e93d0cf4166c/addons/account/models/sequence_mixin.py#L146 Ref: https://github.com/odoo/odoo/blob/1ce06257f877711bd5de5487364909d72b476318/addons/account/models/account_move.py#L4263 sentry-7320998540 Forward-Port-Of: odoo/odoo#266221 Forward-Port-Of: odoo/odoo#253237
This update resolves an error occurring when generating invoices with agricultural tax (ClaveRegimenIvaOpTrascendencia) using the TicketBAI system. The issue stemmed from an incorrect value being submitted, preventing proper invoice processing. This fix ensures accurate invoice generation for clients utilizing this tax regime.
Original PR description
…hase bills **STEP TO REPRODUCE** 1. Create a bill with a invoice line with a regimen agricultura tax. 2. send the bill using TicketBAI. 3. You will get the following error: Error:cvc-enumeration-valid: Value '19' is not facet-valid with respect to enumeration '[01, 02, 03, 04, 05, 06, 07, 08, 09, 12, 13]'. It must be a value from the enumeration. opw-6200686 Forward-Port-Of: odoo/odoo#265785 Forward-Port-Of: odoo/odoo#264037
This update fixes an issue where the search dropdown on the /shop page was partially hidden behind snippet blocks. The change ensures the full search results are always visible, improving the user experience when browsing products. The fix was implemented using JavaScript to adjust the layout of the search bar.
Original PR description
On /shop, when a snippet block sits above the searchbar, the search dropdown was rendered partially hidden behind that block (cropped/unreadable items). Steps to reproduce: =================== 1. Go…
On /shop, when a snippet block sits above the searchbar, the search dropdown was rendered partially hidden behind that block (cropped/unreadable items). Steps to reproduce: =================== 1. Go to /shop. 2. Add a snippet block above the searchbar. 3. Type in the searchbar. => Observed: search results appear cropped, with upper items hidden behind the snippet block above. Root cause: =========== the products grid column (`#products_grid`) has `overflow: auto`, https://github.com/odoo/odoo/blob/d9bb1c1dc90f97b63b87ad762fc4ab36abf7e05f/addons/website_sale/static/src/scss/website_sale.scss#L442 which clips any absolutely-positioned descendant that extends past its bounds. The dropdown's containing block is the searchbar `<form>` (position: relative), which lives inside that column. When the dropdown grew (or flipped to dropup) and extended outside the column, the part outside was clipped, and any positioned snippet siblings above the column painted over the clipped area. Fix: ====== while the dropdown is mounted, lift the `overflow: auto` on its ancestor `div.col` so the menu can extend past the column and paint on top of other content. Done from JS so no SCSS rule has to target the searchbar-specific column. opw-6216317 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265982 Forward-Port-Of: odoo/odoo#265558
This update fixes an issue where automatic check-out was incorrectly calculating extra hours when employees used time off. The change ensures that employee schedules, including time off and breaks, are accurately reflected during automatic check-out, preventing overpayment for hours worked. This improves the accuracy of time tracking and payroll.
Original PR description
# Steps to reproduce 1. Set the Working schedule 40h/week 2. Employee takes 2 hours off from 15:00 to 17:00 and enable automatic check-out 3. Odoo will automatically checks out at 17:06 (scheduled end + tolerance) # Issue - This leads to 2h06 of extra hours being incorrectly recorded. # Fix - Use employee._get_expected_attendances instead, so contract-aware calendar resolution, leaves, and break time handling stay centralized in HR. task-5052044 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235442
This update resolves an issue where certain accounts (119/129) were causing imbalances in the French accounting reports. This change reverts a previous update that introduced the problem, ensuring accurate financial reporting. The fix was triggered by reported errors and is a necessary step to maintain the integrity of our accounting data.
Original PR description
This reverts commit f3851a221dc27d280ce826433f1a709f2b6f1546, after problems have been reported in the display of accounts 119/129, which leaded to an unbalanced Balance Sheet. See opw-6229773 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264923
This update resolves an issue causing incorrect balances in the French Balance Sheet reports, specifically related to accounts 119 and 129. The change reverts a previous update that introduced this imbalance, ensuring accurate financial reporting for French businesses using Odoo Enterprise.
Original PR description
This reverts commit 4ce40ed3be6981b32292d98621f1071d4a431e21, after problems have been reported in the display of accounts 119/129, which leaded to an unbalanced Balance Sheet. See opw-6229773 Forward-Port-Of: odoo/enterprise#117560
This update resolves an issue preventing monthly companies from receiving their inventory valuation journal entries. Previously, a conflicting domain in the cron job caused it to skip both monthly and daily companies. Now, the cron correctly processes both types of companies at the end of the month, ensuring accurate inventory valuation.
Original PR description
#### Description of the issue/feature this PR addresses: The "Stock Account: Inventory Valuation Closing" cron is meant to post valuation journal entries for companies configured with periodic…
#### Description of the issue/feature this PR addresses: The "Stock Account: Inventory Valuation Closing" cron is meant to post valuation journal entries for companies configured with periodic inventory valuation. Due to a faulty domain in ResCompany._cron_post_stock_valuation, monthly companies are never processed, and on the last day of the month daily companies are also skipped. As a result, no inventory valuation journal entries are ever generated by this cron for periodic-valuation companies. #### Current behavior before PR: The cron's domain requires inventory_period = 'daily', which excludes monthly companies on every non-last day of the month. On the last day of the month, an extra AND clause is added requiring inventory_period = 'monthly'. Combined with the existing 'daily' clause, this produces a contradiction (period = 'daily' AND period = 'monthly') that matches no records, so daily companies are dropped on that day as well. Net effect: monthly companies are never processed, and daily companies are skipped on month-end. #### Desired behavior after PR is merged: On a non-last day of the month, the cron processes companies with inventory_period = 'daily'. On the last day of the month, the cron processes both 'daily' and 'monthly' companies, so monthly valuation entries are posted at month-end without dropping daily companies. opw-6115649 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264298
This update fixes an issue where combo products with extra prices weren't correctly converted to the sale order's currency (MXN). Previously, the total price was inaccurate, leading to incorrect invoicing. This change ensures accurate pricing calculations for combo products in MXN, improving financial reporting.
Original PR description
The total of a sale order containing a combo product that has an extra price is not correclty converted to the sale order's pricelist currency Steps to reproduce: 1. Install Sales 2. Go to Invoicing…
The total of a sale order containing a combo product that has an extra price is not correclty converted to the sale order's pricelist currency Steps to reproduce: 1. Install Sales 2. Go to Invoicing > Configuration > Accounting > Currencies and activate currency MXN 3. Go to Sales > Products > Pricelists and create a new pricelist for currency MXN 4. Go to Sales > Products and create a new combo product "test" 5. Create a combo choice "combo" with options "Large Cabinet" and extra price 10000$ 6. Go to Sales and create a new quotation for customer Acme Corporation with product "test" (total is $10,001) 7. Change the pricelist to MXN and update prices 8. The total is ~MX$10,018 (it should be ~MX$186,682) Issue: The extra price of a combo product is not converted to the sale order's pricelist currency, so we end up adding the price of the product in the order's currency with the extra price not converted Solution: Convert the extra price of the combo product to the sale order's pricelist currency opw-6192935 Forward-Port-Of: odoo/odoo#265876 Forward-Port-Of: odoo/odoo#265008
This update resolves inconsistencies in how Odoo handles HTML parsing, specifically related to the libxml2 library. The changes ensure consistent HTML output across different versions of libxml2, improving the reliability of email templates and reports. It also addresses stricter type checking introduced in newer versions of lxml.
Original PR description
## [FIX] core: lxml compatibility v2.14.0+ (HTML parsing) In version 2.14.0, libxml2 fixed a long standing quirk in its HTML handling where it always implies `<p>` start tags [1]. As a result, there…
## [FIX] core: lxml compatibility v2.14.0+ (HTML parsing) In version 2.14.0, libxml2 fixed a long standing quirk in its HTML handling where it always implies `<p>` start tags [1]. As a result, there is a difference in behavior between pre and post 2.14.0 produced HTML when no start tag is provided: - pre: always has a `<p>` tag - post: depending on the case, could have either a `<span>` or `<p>` tag. This commit introduces a monkeypatch of the lxml's HTML parser when built with libxml2 2.14.0+ to maintain a similar behavior with older versions. [1]: https://gitlab.gnome.org/GNOME/libxml2/-/commit/8cf6129bbd836e666e7eda8c9e61c00387ae388b ## [FIX] base,l10n_it_edi: catch TypeError/ValueError for lxml 6+ compat Updates exception handling to account for stricter type checking introduced in lxml 5/6 and libxml2 2.12+. Note: Ubuntu 26.04 (Resolute) provides lxml 6.9.2/libxml2 2.15 while Debian Trixie has lxml 5.4.0/libxml2 2.9.14. Don't be fooled by the version `2.12.7+dfsg+really2.9.14-2.1+deb13u1` which actually means that Debian has reverted/held back the core engine to 2.9.14 while adding commits from 2.12.7. Forward-Port-Of: odoo/odoo#259348
This update corrects a technical issue in the FAIA report export that caused incorrect references to suppliers. Specifically, the report was incorrectly linking a supplier's ID to a customer listing due to differences in how balances are calculated. This ensures the FAIA report accurately reflects supplier information for financial reporting.
Original PR description
## Steps to reproduce: 1. Install `l10n_lu_reports`, swap to the LU company 2. Look at the partner Azure Interior. 1. They have no open balances on `asset_receivable` or `liability_payable` accounts.…
## Steps to reproduce:
1. Install `l10n_lu_reports`, swap to the LU company
2. Look at the partner Azure Interior.
1. They have no open balances on `asset_receivable` or `liability_payable` accounts.
2. Their `supplier_count` is higher than their `customer_count`.
3. Navigate to Accounting > Reporting > General Ledger.
4. Select the 2026 fiscal year.
5. Select gear > FAIA report.
6. Open the downloaded file. Notice:
1. Azure Interior is listed under /MasterFiles/Customers/Customer.
2. There are no /MasterFiles/Suppliers.
3. Azure Interior's ID (14 in this case) is referenced in a /SupplierID section.
7. Take a gander at the official XSD for LU [1]. The SupplierID must match an element in /MasterFiles/Suppliers.
Video: [2]
## Explanation
This is one of several errors found with the FAIA export. See PR #113316 for more.
It's possible to have a /SupplierID listed on a /Transaction/Line element but not have a /Suppliers/Supplier element that it refers to. This is not valid according to the FAIA report's schema [1].
This happens because /Transaction/Line and /MasterFiles use different criteria to determine if a partner is a Customer or a Supplier.
The element /Transaction/Line [3] determines this from the `partner_vals['type']` value [4]. This value is 'customer' or 'supplier' and is determined by comparing the ResPartner fields `customer_rank` and `supplier_rank`. In case of a tie, the partner is assigned as a 'supplier'.
The element /MasterFiles allows a partner to be both a Customer and a Supplier via `partner_vals['types']` [5]. Partners with an open `asset_receivable` balance at the start or end of the reporting period are listed as Customers [6]. Likewise, partners with an open `liability_payable` balance are listed as Suppliers [7]. If there are no open balances, partners are put in the Customer list by default.
The XSD validation error will not show up in a standard Runbot database because the namespace for the XSD is incorrect. If you manually fix the XSD namespace (`xmlns:doc` instead of `xmlns`) and use xmllint to check a generated XML against the XSD, it will raise the following error.
> No match found for key-sequence ['14'] of keyref 'RefGLTransactionLineSupplier'. Downloads/general_ledger (5).xml fails to validate
[1] https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip. I will note that there are three XSDs. Version A has a different namespace and appears to be more restrictive. The "full" XSD document does not raise these errors.
[2] https://drive.google.com/file/d/1xeULpCcGgZk-kYcCjBTKxcfv4ICYRzaB/view?usp=sharing
[3] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L244-L248
[4] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L299
[5] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L303-L309
[6] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L153
[7] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L173
opw-6107107
Forward-Port-Of: odoo/enterprise#117799This update resolves an issue preventing users from editing tracker links. The previous code used inline styles to hide the buttons, which conflicted with newer interaction features. This change replaces inline styles with a more standard CSS class, ensuring the buttons are always visible and functional.
Original PR description
When interactions were introduced, the buttons for link tracker edition were no longer hidden by inline style, but with the class "d-none". Since there was still "display: none" as an inline style in the .xml, the buttons were never shown and the user could not edit the link code. This commit replaces the inline style by the class d-none, since it is a better practice. task-4531974 Forward-Port-Of: odoo/odoo#242481
This update ensures that vendor price selections from purchase orders are accurate, regardless of the user's timezone. Previously, the system incorrectly interpreted dates, leading to missed price matches. This fix converts dates to the user's local timezone for precise calculations.
Original PR description
opw-6211908 ## Summary When selecting a vendor price from `product.supplierinfo`, the purchase module converts `purchase.order.date_order` (a `fields.Datetime` stored in UTC) to a `date` using…
opw-6211908 ## Summary When selecting a vendor price from `product.supplierinfo`, the purchase module converts `purchase.order.date_order` (a `fields.Datetime` stored in UTC) to a `date` using Python's `.date()` method. This extracts the **UTC calendar date** rather than the user's local date. For users in positive-offset timezones (e.g. `Pacific/Auckland` UTC+12, `Africa/Johannesburg` UTC+2), this produces the wrong day, causing `product.supplierinfo` records with `date_start`/`date_end` to be incorrectly included or excluded during vendor price selection. ### Affected methods | File | Method | |------|--------| | `addons/purchase/models/purchase_order_line.py` | `_compute_selected_seller_id` | | `addons/purchase/models/purchase_order_line.py` | `_prepare_purchase_order_line` | | `addons/purchase/models/purchase_order.py` | `_get_product_catalog_lines_data` | ### Fix Replace `.date()` calls with `fields.Date.context_today(record, timestamp=...)` which correctly converts the UTC datetime to the user's timezone before extracting the date. Also fixes `fields.Date.today()` → `fields.Date.context_today(self)` in `_prepare_purchase_order_line` for consistency (same issue — `fields.Date.today()` returns UTC date, not the user's local date). ## Steps to reproduce 1. Set user timezone to **Pacific/Auckland** (UTC+12). 2. Create a product with a vendor pricelist (`product.supplierinfo`) entry: - **Vendor**: any partner - **Price**: 50.00 - **Start Date**: 2026-05-13 - **End Date**: 2026-05-31 3. Create a **Purchase Order** for that vendor. 4. Set the **Order Deadline** to **2026-05-13 08:00** NZST (stored as `2026-05-12 20:00 UTC`). 5. Add the product as a line on the PO. **Expected**: The supplier price of 50.00 is selected — the user's local date (May 13) is within the validity window. **Actual**: No supplier price is matched. `.date()` on the UTC datetime returns `2026-05-12`, which is before `date_start` of `2026-05-13`, so the supplierinfo record is skipped. Forward-Port-Of: odoo/odoo#263992
1 change
Resolved issues and error corrections
This update resolves a bug where the Gantt view incorrectly displayed working hours for flexible employees during public holidays. The fix converts all time zone calculations to UTC, ensuring accurate representation of unavailable hours and preventing employees from being incorrectly scheduled to work during holiday periods. This improves the accuracy of employee scheduling and time tracking.
Original PR description
[FIX] hr_attendance_gantt: fix gantt view with public holidays Bug reproduction: 1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026 2 -…
[FIX] hr_attendance_gantt: fix gantt view with public holidays
Bug reproduction:
1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026
2 - Create a new public holiday on 01/01/2026 (from 00.00 to 23.59 or 23.55 (depends on version, it does not matter))
3 - in attendance app the cell from 00.00 to 01.00 seems white for that day and for selected employee (this cell seems like not holiday and employee can work)
Bug cause:
1 - After a long traceback, _gantt_unavailability in hr_attendance_gantt/HrAttendance, if an employee is flexible then unavailable_intervals is calculated with the Brussel time zone
2 - All other unavailable intervals are converted to the UTC in the function of _gantt_unavailability except in the final lines of the function.
3 - When the employee is flexible and since the conversion is not done in the final lines, it remains 1 hour more (UTC+1), it is from 1 am to 1 am of next day instead of 0 am to 23.59.
Bug solution:
1 - I converted the timezone to UTC to solve the problem.
task - 6067070
Forward-Port-Of: odoo/enterprise#11249312 changes
Resolved issues and error corrections
This update optimizes a key query used in Point of Sale reporting, significantly speeding up the process. By adding the journal to the search criteria, the system now leverages an existing database index, dramatically reducing the time it takes to retrieve account move information. This results in faster and more responsive POS reporting.
Original PR description
Currently the query to get the closing difference account move is done by searching for the reference of the move, which is not very efficient. This commit optimizes this query by adding the journal…
Currently the query to get the closing difference account move is done by searching for the reference of the move, which is not very efficient. This commit optimizes this query by adding the journal to the search criteria, which allows us to benefit from the index on the journal_id field. Here is an example of the before after on a database with 39 million account_move records. Meanwhile only 10-20K account_move are linked to specific journals used in POS payment methods. All measures are performed with a warmed up cache [Explain Before](https://explain.dalibo.com/plan/h8edf56c09d7dfd7) ### Benchmark: <table> <thead> <tr> <th># of am</th> <th>Before</th> <th>After</th> </tr> </thead> <tbody> <tr> <td>38982635</td> <td>~17s</td> <td>~22ms</td> </tr> </tbody> </table> [Explain After](https://explain.dalibo.com/plan/be2397f176a6b29d) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262148
This update resolves an issue where resizing the HTML editor's table would cause a crash when a table was removed. The fix restricts resizing to the primary mouse button and prevents the editor from running resize logic when there's no valid target, ensuring a more stable and reliable table editing experience.
Original PR description
#### Description of the issue this PR addresses: - Table resize listeners are not cleaned when the table is removed while resizing - Next mousemove runs resize logic with a null target and throws traceback #### Desired behavior after PR is merged: - Restrict resize start to primary mouse button only - Prevent resize logic execution on null targets #### Steps to reproduce: - Open the todo app - Insert a table and select whole table - Move cursor on a table cell border to see resize cursor - Right click and choose Cut from browser context menu - Move the mouse again - Resize logic crashes with null target traceback task-6212279 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264065
This update ensures that work entry data exported to the Acerta payroll system adheres to their specific formatting requirements. Specifically, the external reference number and work entry type code are now padded correctly, resolving potential data discrepancies and ensuring accurate payroll processing. This change improves data integrity and compliance with Acerta's system.
Original PR description
We want to adhere to the correct format for the export of work entries to Acerta. There, the number of external reference is padded to 17, not 20, and is followed by 3 spaces, before the date. Also, the code of the work entry type is padded to 4 and followed by 2 spaces. Task: 6168106 Forward-Port-Of: odoo/enterprise#118124
This update fixes an issue where employees with time off were incorrectly recorded as working extra hours during automatic check-out. The change ensures that employee schedules, including time off and breaks, are accurately reflected when calculating attendance, leading to more precise overtime tracking.
Original PR description
# Steps to reproduce 1. Set the Working schedule 40h/week 2. Employee takes 2 hours off from 15:00 to 17:00 and enable automatic check-out 3. Odoo will automatically checks out at 17:06 (scheduled end + tolerance) # Issue - This leads to 2h06 of extra hours being incorrectly recorded. # Fix - Use employee._get_expected_attendances instead, so contract-aware calendar resolution, leaves, and break time handling stay centralized in HR. task-5052044 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235442
This update resolves a bug where the Gantt view incorrectly displayed employee availability during public holidays for flexible schedules. The fix converts all time zone calculations to UTC, ensuring accurate representation of unavailable hours and preventing employees from being marked as available during holiday periods. This improves the accuracy of employee scheduling and time tracking.
Original PR description
[FIX] hr_attendance_gantt: fix gantt view with public holidays Bug reproduction: 1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026 2 -…
[FIX] hr_attendance_gantt: fix gantt view with public holidays
Bug reproduction:
1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026
2 - Create a new public holiday on 01/01/2026 (from 00.00 to 23.59 or 23.55 (depends on version, it does not matter))
3 - in attendance app the cell from 00.00 to 01.00 seems white for that day and for selected employee (this cell seems like not holiday and employee can work)
Bug cause:
1 - After a long traceback, _gantt_unavailability in hr_attendance_gantt/HrAttendance, if an employee is flexible then unavailable_intervals is calculated with the Brussel time zone
2 - All other unavailable intervals are converted to the UTC in the function of _gantt_unavailability except in the final lines of the function.
3 - When the employee is flexible and since the conversion is not done in the final lines, it remains 1 hour more (UTC+1), it is from 1 am to 1 am of next day instead of 0 am to 23.59.
Bug solution:
1 - I converted the timezone to UTC to solve the problem.
task - 6067070
Forward-Port-Of: odoo/enterprise#112493This update resolves an issue where UBL imports with taxes set to 'price_include' were failing to correctly calculate and apply taxes, particularly for invoices with multiple items. The fix ensures accurate tax calculations and adjustments, regardless of the quantity of items on the invoice. This improves the reliability of UBL import processes.
Original PR description
**PROBLEMS** 1. On a company with taxes with price_include = True, we fail to retrieve a tax when importing a ubl. 2. The price_unit adjustement for when importing price-included taxes doesn't account for quantity. **STEP TO REPRODUCE** 1. Have a setup where the tax are only price_include. 2. Import a ubl, the taxes will not be retrieved. 3. Run odoo only with the fix for problem 1, and import the same ubl with some invoice quantity != 1 4. Notice the price unit are messed up for lines with quantity != 1 (odoo tries to correct the untaxed amount with a line, but this doesn't fixes the tax). opw-6159394 Forward-Port-Of: odoo/odoo#265347 Forward-Port-Of: odoo/odoo#262686
This update resolves an error occurring when generating purchase invoices with agricultural tax (Regimen Agricultura) using the TicketBAI system. The issue stemmed from an incorrect value being submitted, preventing proper invoice processing. This fix ensures accurate invoice generation and compliance with Spanish tax regulations.
Original PR description
…hase bills **STEP TO REPRODUCE** 1. Create a bill with a invoice line with a regimen agricultura tax. 2. send the bill using TicketBAI. 3. You will get the following error: Error:cvc-enumeration-valid: Value '19' is not facet-valid with respect to enumeration '[01, 02, 03, 04, 05, 06, 07, 08, 09, 12, 13]'. It must be a value from the enumeration. opw-6200686 Forward-Port-Of: odoo/odoo#265785 Forward-Port-Of: odoo/odoo#264037
This update fixes an issue where combo products with extra prices weren't correctly converted to the sale order's currency. Previously, the total price was inaccurate when using different currencies. Now, the system accurately calculates and displays the total price, ensuring correct invoicing and financial reporting.
Original PR description
The total of a sale order containing a combo product that has an extra price is not correclty converted to the sale order's pricelist currency Steps to reproduce: 1. Install Sales 2. Go to Invoicing…
The total of a sale order containing a combo product that has an extra price is not correclty converted to the sale order's pricelist currency Steps to reproduce: 1. Install Sales 2. Go to Invoicing > Configuration > Accounting > Currencies and activate currency MXN 3. Go to Sales > Products > Pricelists and create a new pricelist for currency MXN 4. Go to Sales > Products and create a new combo product "test" 5. Create a combo choice "combo" with options "Large Cabinet" and extra price 10000$ 6. Go to Sales and create a new quotation for customer Acme Corporation with product "test" (total is $10,001) 7. Change the pricelist to MXN and update prices 8. The total is ~MX$10,018 (it should be ~MX$186,682) Issue: The extra price of a combo product is not converted to the sale order's pricelist currency, so we end up adding the price of the product in the order's currency with the extra price not converted Solution: Convert the extra price of the combo product to the sale order's pricelist currency opw-6192935 Forward-Port-Of: odoo/odoo#265876 Forward-Port-Of: odoo/odoo#265008
This update fixes an issue where bank statement reconciliation wouldn't correctly match multiple payments with the same reference. Previously, the system would skip these matches, leading to inaccurate statement line reporting. Now, the system accurately reconciles with multiple matching payments, ensuring correct financial reporting.
Original PR description
Currently, auto-reconciliation skip multiple matching payments with the same reference. This, however, will make the statement line match the invoice/bill instead of its payments. Steps to reproduce: - Add the outstanding account on the Bank journal incoming payment method - Create an invoice. - Register two separate payments for this invoice with the same communication reference. - Import via file two bank statement lines matching the payment amounts and reference. Issue: The statement lines are not automatically reconciled with the payments, because the system expects to find a single match. When it founds multiple payments, it won't reconcile skipping to the next matching method that will retrieve the invoice. opw-6022731
This update allows users to specify HS codes when delivering consumables internationally. Previously, this information couldn't be captured, which could lead to compliance issues when shipping products abroad. This change ensures accurate tracking and reporting for international shipments of consumable goods.
Original PR description
Commit 20c3aa9b618b3 moved the fields `hs_code` and `country_of_origin` to a view block only visible if Lots/Serial setting is activated and if the product is tracked (is_storable=True). This is an issue as we may want to delivery a consumable abroad. An HS code may be required but there is no possibility to fill it. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change optimizes the process of exporting large datasets in Odoo reports. Previously, the export method prefetched data, leading to memory issues. By batching the export calls and invalidating recordsets, we've significantly reduced memory usage and improved export speeds, especially for larger datasets.
Original PR description
When exporting a number N of records as XLSX or CSV file, we call the export_data() method for the N records at the same time. This method prefetches the selected fields for all the records which can lead to memory limit errors when N is too large. We propose to batch this call and invalidate the recordsets between batches. Benchmarks ----------- Execution time: | No records | Before PR | After PR | |------------|-----------|----------| | 70 260 | 3.82 s | 3.94 s | | 228 116 | 18.71 s | 19.36 s | | 394 381 | 31.02 s | 32.67 s | Memory usage: | No records | Before PR | After PR | |------------|-----------|----------| | 70 260 | 316.0 MB | 273.5 MB | | 228 116 | 796.9 MB | 620.8 MB | | 394 381 | 1.3 GB | 947.7 MB | opw-5881026 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265844 Forward-Port-Of: odoo/odoo#257333
This update fixes a reporting issue where service sales from European companies to Northern Ireland were incorrectly included in the EC Sales List Report. The change ensures that only goods and triangular transactions are reported, aligning with accurate tax regulations. This update specifically addresses the Belgium localization.
Original PR description
…in EC Sales List The services sales done from a european company to a Northern Ireland company should not be included in the EC Sales List Report. It should however be the case for goods and triangular transactions. test is added in Belgium localization because only localizations have handlers using tax tags instead of taxes, and services/goods/triangular sales distinction can be made with these. task-6007931 Forward-Port-Of: odoo/enterprise#117754 Forward-Port-Of: odoo/enterprise#110007
2 changes
Resolved issues and error corrections
This update ensures that work entry data exported to the Acerta payroll system adheres to their specific formatting requirements. The export now correctly pads the external reference number to 17 digits with spaces and formats the work entry type code to 4 digits with spaces, resolving potential data discrepancies and ensuring accurate payroll processing.
Original PR description
We want to adhere to the correct format for the export of work entries to Acerta. There, the number of external reference is padded to 17, not 20, and is followed by 3 spaces, before the date. Also, the code of the work entry type is padded to 4 and followed by 2 spaces. Task: 6168106 Forward-Port-Of: odoo/enterprise#118124
This update corrects a technical issue where the FAIA report was incorrectly referencing suppliers without matching entries in the system. This ensures accurate reporting of financial data for the LU company, resolving a discrepancy identified during report generation. The fix ensures compliance with reporting standards.
Original PR description
## Steps to reproduce: 1. Install `l10n_lu_reports`, swap to the LU company 2. Look at the partner Azure Interior. 1. They have no open balances on `asset_receivable` or `liability_payable` accounts.…
## Steps to reproduce:
1. Install `l10n_lu_reports`, swap to the LU company
2. Look at the partner Azure Interior.
1. They have no open balances on `asset_receivable` or `liability_payable` accounts.
2. Their `supplier_count` is higher than their `customer_count`.
3. Navigate to Accounting > Reporting > General Ledger.
4. Select the 2026 fiscal year.
5. Select gear > FAIA report.
6. Open the downloaded file. Notice:
1. Azure Interior is listed under /MasterFiles/Customers/Customer.
2. There are no /MasterFiles/Suppliers.
3. Azure Interior's ID (14 in this case) is referenced in a /SupplierID section.
7. Take a gander at the official XSD for LU [1]. The SupplierID must match an element in /MasterFiles/Suppliers.
Video: [2]
## Explanation
This is one of several errors found with the FAIA export. See PR #113316 for more.
It's possible to have a /SupplierID listed on a /Transaction/Line element but not have a /Suppliers/Supplier element that it refers to. This is not valid according to the FAIA report's schema [1].
This happens because /Transaction/Line and /MasterFiles use different criteria to determine if a partner is a Customer or a Supplier.
The element /Transaction/Line [3] determines this from the `partner_vals['type']` value [4]. This value is 'customer' or 'supplier' and is determined by comparing the ResPartner fields `customer_rank` and `supplier_rank`. In case of a tie, the partner is assigned as a 'supplier'.
The element /MasterFiles allows a partner to be both a Customer and a Supplier via `partner_vals['types']` [5]. Partners with an open `asset_receivable` balance at the start or end of the reporting period are listed as Customers [6]. Likewise, partners with an open `liability_payable` balance are listed as Suppliers [7]. If there are no open balances, partners are put in the Customer list by default.
The XSD validation error will not show up in a standard Runbot database because the namespace for the XSD is incorrect. If you manually fix the XSD namespace (`xmlns:doc` instead of `xmlns`) and use xmllint to check a generated XML against the XSD, it will raise the following error.
> No match found for key-sequence ['14'] of keyref 'RefGLTransactionLineSupplier'. Downloads/general_ledger (5).xml fails to validate
[1] https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip. I will note that there are three XSDs. Version A has a different namespace and appears to be more restrictive. The "full" XSD document does not raise these errors.
[2] https://drive.google.com/file/d/1xeULpCcGgZk-kYcCjBTKxcfv4ICYRzaB/view?usp=sharing
[3] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L244-L248
[4] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L299
[5] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L303-L309
[6] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L153
[7] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L173
opw-6107107
Forward-Port-Of: odoo/enterprise#1177996 changes
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
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.
6 changes
Resolved issues and error corrections
This update corrects a reporting issue in the GSTR-3B form by ensuring it only displays inward supplies, as required by tax regulations. Previously, both inward and outward supplies were incorrectly shown, leading to potential reporting inaccuracies. This change improves the accuracy of tax reporting.
Original PR description
Previously, both inward and outward composition supplies were appearing in table 5 of GSTR-3B, even though table 5 is meant only for inward supplies. This commit adds a `move_type` condition to ensure only inward supplies are considered in the report line. task-6239870
This update resolves an issue where signed PDF documents lost their original bookmarks and links. The fix ensures that signed documents remain fully navigable and preserve the original document structure and integrity, improving usability and data consistency.
Original PR description
Version - 18.0 Steps to reproduce: 1. Upload a PDF document containing bookmarks and internal/external links. 2. Sign the document and download the signed PDF. 3. Open the downloaded file and check the bookmarks and links. Issue: When a signed document was downloaded, the original PDF bookmarks And the links were not working. This broke structured navigation and affected document integrity. Fix: The PDF signing process has been updated to preserve the original bookmarks and ensure internal and external links remain functional after signing. Impact: - Signed documents remain navigable and consistent with the original PDF. - Preserves document structure and integrity. Task- 4915124 Forward-Port-Of: odoo/enterprise#117881 Forward-Port-Of: odoo/enterprise#108684
This update resolves an issue where the 'Info & Tags' chatter wasn't visible in the mobile Documents app's Kanban view. The fix adjusts CSS styling to ensure the chatter element is always accessible and scrollable, improving usability on mobile devices. This ensures users can easily access important document information.
Original PR description
**Steps to reproduce:** - Go to Documents app in mobile - Go to the kanban view - Add some files and select one - Click on `Info & Tags` button in the control panel - Reload the page - Chatter is not…
**Steps to reproduce:** - Go to Documents app in mobile - Go to the kanban view - Add some files and select one - Click on `Info & Tags` button in the control panel - Reload the page - Chatter is not displayed but the button is still enabled - Switching to the list view properly shows it **Issue:** We have two conflicting css styling on mobile: - `overflow-hidden` was added for mobile to avoid multiple scroll bars - `min-height: 100%` which is due to the default `o_kanban_ungrouped` in the controller css This means that the element is present at the bottom of the page, but we can't get to it manually. When re-enabling the action we are properly moved to the existing chatter (but we can't go back to the top). Also the documents panel should have a single scrollbar to display all the records, but we still need a way to scroll the messages of the chatter. **Fix:** Set `min-height: 0;` for documents kanban to ensure the chatter is still visible and accessible on mobile by default. This makes the chatter take the full available height when displayed. original overflow fix: https://github.com/odoo/enterprise/commit/945b9e2b1c6752bd905695aa40b0babcf38c50cd opw-6061993 Forward-Port-Of: odoo/enterprise#113168
This update fixes a technical error that prevented users from reviewing eMPF contribution reports in the Hong Kong module. Specifically, the system would throw an error when a contribution line was created without an associated employee. The fix ensures a user-friendly error message prompts the user to add the employee information, improving report accuracy and usability.
Original PR description
Currently, an error occurs when the user checks the report line errors. **Steps to Reproduce:** - Install the `l10n_hk_hr_payroll_empf` module with demo data. - Switch to the `Hong Kong` company. -…
Currently, an error occurs when the user checks the report line errors. **Steps to Reproduce:** - Install the `l10n_hk_hr_payroll_empf` module with demo data. - Switch to the `Hong Kong` company. - Go to `Payroll` > `Reporting` > `Hong Kong` > `eMPF Contributions`. - Create a record by setting the `Scheme` and adding a `contribution line`. - Ensure that the employee and payslip fields are empty in the contribution line. - Click on `Validate`, then click on the `error icon` on the report line. `ValueError: Expected singleton: hr.version()` This error occurs when the user manually adds a line and checks the errors on it.. The system attempts to open the employee record from the version [1], but the version is not set [2] on the line because there is no employee. And it raise the error [3]. This commit ensures that when checking errors, if the version is not set on the line, a UserError is raised, prompting the user to set the employee on the line. It also corrects a typo in the status message. [1]- https://github.com/odoo/enterprise/blob/7889b2b0b3d13b32e6e36e616e20379d8c8f8812/l10n_hk_hr_payroll_empf/model/l10n_hk_empf_contribution_report_line.py#L219 [2]- https://github.com/odoo/enterprise/blob/7889b2b0b3d13b32e6e36e616e20379d8c8f8812/l10n_hk_hr_payroll_empf/model/l10n_hk_empf_contribution_report_line.py#L142-L156 [3]: https://github.com/odoo/odoo/blob/98855c6b70df24500babe6027109aa9e17431ec1/addons/hr/models/hr_version.py#L609-L611
This update resolves a bug where the Gantt view incorrectly displayed working hours for flexible employees during public holidays. The fix converts all time zone calculations to UTC, ensuring accurate representation of unavailable periods and preventing employees from being marked as available during holiday times. This improves the accuracy of employee scheduling.
Original PR description
[FIX] hr_attendance_gantt: fix gantt view with public holidays Bug reproduction: 1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026 2 -…
[FIX] hr_attendance_gantt: fix gantt view with public holidays
Bug reproduction:
1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026
2 - Create a new public holiday on 01/01/2026 (from 00.00 to 23.59 or 23.55 (depends on version, it does not matter))
3 - in attendance app the cell from 00.00 to 01.00 seems white for that day and for selected employee (this cell seems like not holiday and employee can work)
Bug cause:
1 - After a long traceback, _gantt_unavailability in hr_attendance_gantt/HrAttendance, if an employee is flexible then unavailable_intervals is calculated with the Brussel time zone
2 - All other unavailable intervals are converted to the UTC in the function of _gantt_unavailability except in the final lines of the function.
3 - When the employee is flexible and since the conversion is not done in the final lines, it remains 1 hour more (UTC+1), it is from 1 am to 1 am of next day instead of 0 am to 23.59.
Bug solution:
1 - I converted the timezone to UTC to solve the problem.
task - 6067070
Forward-Port-Of: odoo/enterprise#112493This update corrects a problem with Odoo's Mexican CFDI (electronic invoice) exports. Previously, cash rounding lines were incorrectly included, causing export errors. This fix ensures that only the pre-rounding amounts are reported, complying with SAT regulations and preventing export rejections.
Original PR description
When using the 'add_invoice_line' cash rounding strategy, Odoo adds a journal line with display_type='rounding'. This line has no product and therefore no ClaveProdServ, causing PAC to reject the XML with error 301. Per SAT regulations, cash rounding is not a valid CFDI concept. The CFDI must report the pre-rounding amounts (e.g. 99.80); the rounding difference (e.g. 0.20) belongs only in the journal entry on the accounting side. opw-6024078 Forward-Port-Of: odoo/enterprise#112633
7 changes
Resolved issues and error corrections
This update fixes an issue where imported Peppol invoices with tax-included prices were incorrectly inflating unit prices when multiple quantities were imported. The fix ensures accurate tax calculations and correct unit pricing, preventing overcharging and improving data integrity during invoice imports. This impacts how tax is handled on imported invoices.
Original PR description
When importing a Peppol invoice with tax-included prices, the importer was incorrectly adding the total line tax to the per-unit price, which caused the price_unit to be inflated for quantities greater than 1. This fix computes the per-unit tax by dividing the total tax by quantity and restores the correct formula price_unit * (1 + rate). Step to reproduce: - Configure a company with "Tax-Included" Prices. - Receive a Peppo invoice from supplier A with a line named TEST, with quantity 1 and a tax. - Import the same invoice but with quantity 2. Expected behavior: The price_unit of the line TEST should be the same in both cases, and the total tax should be correctly computed as price_unit * quantity * tax_rate. Actual behavior: The price_unit of the line TEST with quantity 2 is inflated opw-6177504
This update resolves an issue where account consolidation reports would exclude accounts without a defined code on the selected company. Now, the system intelligently uses account codes from other companies within the consolidation to ensure accurate reporting and financial figures. This improves the reliability of consolidated reports.
Original PR description
When having an horizontal group with domain including two companies that
share the same account codes, report lines with account codes engine
don't display the two companies values when both are selected in the
company selector.
Steps to reproduce:
- Install l10n_ch and create two CH companies (CH1 and CH2)
- Create an horizontal group with the field 'Company' and domain '["|",
("name", "=", "CH Company"), ("name", "=", "CH 2")]"
- Apply the Horizontal group to CH balance sheet report
- Select both companies in the company selector
- Open CH BS report and activate the horizontal group
-> Only the column of one company is filled
Fix:
https://github.com/odoo/enterprise/commit/9b775ed9d8b2a18e708219c72e95652571f3936a
was introduced in 19.0 to fix the same issue, we fix by backporting it
but we also need to backport this perf commit https://github.com/odoo/enterprise/commit/7da3123dc4487a7092deef8503a9791ceffddcfb
that refactored the code before in a first place
opw-6204601This update fixes an issue where automatic check-out was incorrectly calculating overtime hours when employees took time off. By using a more accurate method for determining expected work hours, the system now correctly accounts for employee leave, breaks, and contracts, ensuring accurate overtime tracking. This improves the reliability of time tracking data.
Original PR description
# Steps to reproduce 1. Set the Working schedule 40h/week 2. Employee takes 2 hours off from 15:00 to 17:00 and enable automatic check-out 3. Odoo will automatically checks out at 17:06 (scheduled end + tolerance) # Issue - This leads to 2h06 of extra hours being incorrectly recorded. # Fix - Use employee._get_expected_attendances instead, so contract-aware calendar resolution, leaves, and break time handling stay centralized in HR. task-5052044 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where Verifactu invoice generation failed after invoicing a Point of Sale order. The fix allows for successful invoice creation even when the order is already invoiced, ensuring consistent functionality with the original PoS invoice process. It streamlines the invoicing workflow for Spanish companies using Verifactu.
Original PR description
**Steps to reproduce:** - Setup a Verifactu installation and a Spanish company - Go to the PoS, make a Sale - Keep the ticket - Go to the /pos/ticket URL and enter the ticket informations - Last step…
**Steps to reproduce:** - Setup a Verifactu installation and a Spanish company - Go to the PoS, make a Sale - Keep the ticket - Go to the /pos/ticket URL and enter the ticket informations - Last step also works when requesting an invoice in the backend on the order - Go to the order in the backend, an error is shown, the cancellation didn't go through **Veri*Factu documents can only be generated for paid or posted Point of Sale Orders.** **Why the fix:** When we directly invoice an order, we do not go through the verification of being paid and done. This is why is works, but when making the invoice after the sale is done, we cancel the order first, then we register the invoice instead. When trying to cancel the order, we check if the order is either paid or done, but it is currently invoiced as we just generated the invoice. We now allow no errors if the order is in the invoiced state, and let it pass through. With this flow we get the same result as the direct invoice from the PoS. The new cancellation on the order and submission on the invoice may take a bit of time to get accepted but they will be eventually. opw-6139200
This update resolves an issue preventing users from correctly inserting dynamic fields within SMS templates in Marketing Automation. The fix ensures the system recognizes the correct data source (`mailing_model_real`) for Lead and Opportunity targets, allowing users to build more effective SMS campaigns. This improves the overall user experience and campaign effectiveness.
Original PR description
The SMS template form view in Marketing Automation was missing the `dynamic_placeholder_model_reference_field` option on the `body_plaintext` field. Without this option, the dynamic placeholder hook falls back to looking for a `model` field in the record data, but `mailing.mailing` uses `mailing_model_real` instead. Steps To Reproduce: - Install marketing_automation_sms and CRM modules (also activate Leads). - Start a new Campaign in Marketing Automation. - Set Target to Lead/Opportunity. - Add New Activity > Activity Type = SMS > SMS Template = create one. - In the SMS template dialog, click the "Insert Field" button. - Error appears: "You need to select a model before opening the dynamic placeholder selector." Ticket [link](https://www.odoo.com/odoo/project.task/5488849) opw-5488849
This update corrects a flaw in the FAIA report export that caused incorrect references to suppliers. Specifically, the report was misidentifying Azure Interior as a supplier when it should have been listed as a customer due to the absence of open balances. This ensures accurate reporting and compliance.
Original PR description
## Steps to reproduce: 1. Install `l10n_lu_reports`, swap to the LU company 2. Look at the partner Azure Interior. 1. They have no open balances on `asset_receivable` or `liability_payable` accounts.…
## Steps to reproduce:
1. Install `l10n_lu_reports`, swap to the LU company
2. Look at the partner Azure Interior.
1. They have no open balances on `asset_receivable` or `liability_payable` accounts.
2. Their `supplier_count` is higher than their `customer_count`.
3. Navigate to Accounting > Reporting > General Ledger.
4. Select the 2026 fiscal year.
5. Select gear > FAIA report.
6. Open the downloaded file. Notice:
1. Azure Interior is listed under /MasterFiles/Customers/Customer.
2. There are no /MasterFiles/Suppliers.
3. Azure Interior's ID (14 in this case) is referenced in a /SupplierID section.
7. Take a gander at the official XSD for LU [1]. The SupplierID must match an element in /MasterFiles/Suppliers.
Video: [2]
## Explanation
This is one of several errors found with the FAIA export. See PR #113316 for more.
It's possible to have a /SupplierID listed on a /Transaction/Line element but not have a /Suppliers/Supplier element that it refers to. This is not valid according to the FAIA report's schema [1].
This happens because /Transaction/Line and /MasterFiles use different criteria to determine if a partner is a Customer or a Supplier.
The element /Transaction/Line [3] determines this from the `partner_vals['type']` value [4]. This value is 'customer' or 'supplier' and is determined by comparing the ResPartner fields `customer_rank` and `supplier_rank`. In case of a tie, the partner is assigned as a 'supplier'.
The element /MasterFiles allows a partner to be both a Customer and a Supplier via `partner_vals['types']` [5]. Partners with an open `asset_receivable` balance at the start or end of the reporting period are listed as Customers [6]. Likewise, partners with an open `liability_payable` balance are listed as Suppliers [7]. If there are no open balances, partners are put in the Customer list by default.
The XSD validation error will not show up in a standard Runbot database because the namespace for the XSD is incorrect. If you manually fix the XSD namespace (`xmlns:doc` instead of `xmlns`) and use xmllint to check a generated XML against the XSD, it will raise the following error.
> No match found for key-sequence ['14'] of keyref 'RefGLTransactionLineSupplier'. Downloads/general_ledger (5).xml fails to validate
[1] https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip. I will note that there are three XSDs. Version A has a different namespace and appears to be more restrictive. The "full" XSD document does not raise these errors.
[2] https://drive.google.com/file/d/1xeULpCcGgZk-kYcCjBTKxcfv4ICYRzaB/view?usp=sharing
[3] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L244-L248
[4] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L299
[5] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L303-L309
[6] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L153
[7] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L173
opw-6107107
Forward-Port-Of: odoo/enterprise#117799This update resolves a problem where Xrechnung invoices generated in Odoo weren't consistently passing validation checks used by some German clients. The fix ensures the invoices conform to required standards, preventing potential issues with invoice processing. This improves compatibility with key German customers.
Original PR description
**PROBLEM** xrechnung pdf invoices are not compliant with some validators used german clients. **STEP TO REPRODUCE** 1. Create an invoice for a german customer. 2. Set the edi format on the customer as Xrechnung. 3. Download the invoice pdf, and verify it on https://www.portinvoice.com/ 4. Notice the pdf is not valid. To verify my fix works, you need to have the fontTools python package installed (for pdfa conversion). opw-6030481 Forward-Port-Of: odoo/odoo#259318
1 change
Resolved issues and error corrections
This update resolves an issue where upsell quantities were incorrectly added to the original subscription order line. The fix utilizes a 'sequence' field to ensure accurate matching between parent and upsell lines, guaranteeing correct quantity updates and preventing incorrect order calculations. This improves the reliability of subscription order management.
Original PR description
Steps to reproduce: ----------------------------------- 1. Install Subscription module 2. Create and Confirm Subscription Order as follows: * Create 2 SOL with the same product with different…
Steps to reproduce: ----------------------------------- 1. Install Subscription module 2. Create and Confirm Subscription Order as follows: * Create 2 SOL with the same product with different quantities 3. Create and Confirm the Invoice of the Sale Order 4. Create an Upsell of the SO 5. Change the First line's quantity to any value (e.g, 3) 6. Confirm the Upsell Order 7. Go back to the original order Observation: ----------------------------------- The quantity added in Upsell is added to the quantity of the Second line of the Original Order. Issue: ----------------------------------- The `_compute_parent_line_id` method matches upsell lines to their parent lines based on product attributes (product_id, price_unit, product_uom_id, currency_id, plan_id). When multiple parent lines have identical attributes, the matching becomes ambiguous. The algorithm processes upsell lines sequentially and removes each matched parent from the pool. https://github.com/odoo/enterprise/blob/4c9682e9cf84a0e4e69b5b650833cbccc77b063e/sale_subscription/models/sale_order_line.py#L336-L337 Without a stable identifier like a sequence, the algorithm takes the LAST matching line arbitrarily, causing incorrect parent-child mappings. Solution: ----------------------------------- Using 'sequence' as the matching criteria in `_compute_parent_line_id`, Sequence provides a stable, predictable identifier that preserves line order. Lines with the same product attributes but different sequences will now match correctly based on their position in the order. Added 'sequence' to line_values in `_get_renew_upsell_values` because the `parent_line_id` field is a COMPUTED field (with `store=True`). When creating upsell lines, even though we set `'parent_line_id': line.id` in the values, Odoo will recompute it using `_compute_parent_line_id`. If we don't preserve the sequence from the parent line, the newly created upsell line will get a default/auto-incremented sequence that doesn't match its parent's sequence. This breaks the sequence-based matching we just added. opw-6083153