Daily updates from Odoo
Tuesday, April 21, 2026
10 changes · 19.0
Resolved issues and error corrections
Opening a Peppol XML file that contains an embedded PDF now displays the PDF preview instead of showing raw XML or an error. This makes invoice documents easier to review in Documents and prevents the thumbnail generation from failing for this common file type.
Original PR description
**Steps To Reproduce** - Go to Documents app - Upload a Peppol XML file containing an embedded PDF (e.g., invoice with attached PDF) - Open the document **Issue** Opening a Peppol XML document with…
**Steps To Reproduce** - Go to Documents app - Upload a Peppol XML file containing an embedded PDF (e.g., invoice with attached PDF) - Open the document **Issue** Opening a Peppol XML document with an embedded PDF causes: `UserError: Only PDF files can have a thumbnail` The kanban view also shows raw XML code instead of the PDF preview. **Cause** Since this commit: https://github.com/odoo/odoo/commit/37e38b8cd34e The mail module's `mail_attachement_update_thumbnail` route has a strict mimetype check that rejects thumbnail updates for XML files: https://github.com/odoo/odoo/blob/c350592b85001b5f36ea6aaf803ee3974e5ebfc1/addons/mail/controllers/attachment.py#L146-L147 Additionally, the documents thumbnail service only generates thumbnails for files where `isPdf()` returns true: https://github.com/odoo/enterprise/blob/60881b65991cbd2594492b25900ab4bb8c166250/documents/static/src/views/helper/documents_client_thumbnail_service.js#L27-L35 **Solution** Add `_allow_thumbnail()` hook to allow overriding the mimetype check And from this PR, I see that a proper thumbnail is the proper behavior: https://github.com/odoo/enterprise/pull/49111 Which required the thumbnail generation flow multiple overrides: 1. **`isPdf()` check**: The documents thumbnail service only generates thumbnails for files where `isPdf()` returns true. XML files return false, so thumbnail generation is never triggered: https://github.com/odoo/enterprise/blob/60881b65991cbd2594492b25900ab4bb8c166250/documents/static/src/views/helper/documents_client_thumbnail_service.js#L28-L35 2. **`pdf_first_page`**: When thumbnail generation runs, it fetches the first page of the PDF via these routes. For XML with embedded PDFs, the routes must extract and return the embedded PDF bytes instead of the raw XML content: https://github.com/odoo/odoo/blob/c350592b85001b5f36ea6aaf803ee3974e5ebfc1/addons/mail/controllers/attachment.py#L120-L127 https://github.com/odoo/enterprise/blob/60881b65991cbd2594492b25900ab4bb8c166250/documents/controllers/documents.py#L515-L528 3. **`isTextualDocument` in kanban**: XML files are treated as textual documents and displayed showing raw XML code, even when they contain an embedded PDF that should be previewed instead: https://github.com/odoo/enterprise/blob/60881b65991cbd2594492b25900ab4bb8c166250/documents/views/documents_document_views.xml#L106 opw-5252946 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Generating a W-2 CSV now works even when the report’s end date is left blank. If no end date is provided, the system will use the current year for the file name instead of stopping with an error. This prevents a frustrating interruption when users create payroll reports.
Original PR description
Currently, an error occurs when user tries to create a csv for w2 form with no end date defined. Steps to replicate: - Install `l10n_us_hr_payroll`. - Open Payroll > Reporting > W2 Report. - Click…
Currently, an error occurs when user tries to create a csv for w2 form with no end date defined.
Steps to replicate:
- Install `l10n_us_hr_payroll`.
- Open Payroll > Reporting > W2 Report.
- Click `New` > Remove value from `End Date` and click Generate.
Error:
```
File '/home/odoo/odoo19/enterprise/l10n_us_hr_payroll/models/l10n_us_w2.py', line 249, in action_generate_csv
self.csv_filename = f'form_w2_{self.date_end.year or date.today().year}.csv'
^^^^^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'year'
```
Cause:
- As the user did not give any value for `End Date`, False was passed and when the execution flow reached [here] `self.end_date` is False and attempting to access `self.end_date.year` results in this error.
Solution:
- If we do not receive the `self.end_date` while generating the CSV, we will use the current year to generate the CSV file name.
[here]: https://github.com/odoo/enterprise/blob/01be8d6e9384bcb340559847d529b4887e073519/l10n_us_hr_payroll/models/l10n_us_w2.py#L248
No ID
Forward-Port-Of: odoo/enterprise#113408A typo in the quality module prevented newly created quality alerts from being assigned to the correct stage, causing them to appear under "None". This fix restores the proper grouping so records are shown where users expect them.
Original PR description
Issue: ------- While adapting the 'Domain' in the PR https://github.com/odoo/enterprise/commit/07b34a2e927347ca5c839ec632808adb02703e1f there occurred a typo where '|' got replaced with the '&' and causing the records getting grouped in 'None' when creating. Solution: ------------ To replace '&' with '|' to get the records grouped under the correct stage. Steps to reproduce: ----------------------- 1. In v19.0, in quality module try to create a quality alert record. 2. Just like that the newly created record will be under 'None'. Reference Image: <img width="1105" height="407" alt="image" src="https://github.com/user-attachments/assets/4c9c33be-ec06-4f06-8245-54dbe4473bc0" /> OPW - [6074016](https://www.odoo.com/odoo/project/70/tasks/6074016)
Companies that use Belgian taxes through a Belgian fiscal position can now see the Intervat settings in the configuration screen. This fixes a blocker where the settings could not be reviewed or turned off even though Belgian tax rules were active.
Original PR description
### Issue: When demo data is disabled, creating a Belgian fiscal position installs the Belgian taxes and enables BE accounting Starting from 19.0, Intervat redirection is enabled automatically, but the Intervat settings are not available because the company itself is not Belgian As a result, the Intervat configuration cannot be changed or disabled ### Cause: The Intervat settings were only shown when the company country was Belgium However, companies using Belgian taxes through `account_enabled_tax_country_ids` must also be considered ### Steps to reproduce: - Disable demo data and install `accountant` - Create a Fiscal Position "Belgium" (Country: Belgium, Foreign Tax ID: BE010203040) - Click the alert to install the Belgian taxes - Open Settings Before the fix: The Intervat settings are not available opw-6068480
This change updates the test invoices used for Peruvian electronic invoicing so they match the corrected unit price rounding rules. It helps keep the automated checks reliable and prevents false failures in the localization tests.
Original PR description
https://github.com/odoo/odoo/commit/e79136d04c844f9a0a8c6d0532c65e0cc3a68b8f fixes unit price rounding in peppol. This PR fixes a broken test in l10n_pe_edi opw-6009771 Forward-Port-Of: odoo/enterprise#114159
This fix restores document uploads for portal users on mobile devices when sharing folders with edit access. It keeps the upload menu open long enough for the file selection to complete, so uploads start reliably after choosing a file.
Original PR description
Steps to reproduce: 1. Install `documents` 2. Create a portal user and share a document folder with edit access 3. Log in as the portal user on a mobile device 4. Try to upload a document inside the…
Steps to reproduce:
1. Install `documents`
2. Create a portal user and share a document folder with edit access
3. Log in as the portal user on a mobile device
4. Try to upload a document inside the shared folder
Issue:
- After selecting a file from the file picker, the document is not uploaded.
Cause:
- On mobile in the portal flow, Upload is triggered from a nested dropdown (inside New) inside the adaptive control-panel dropdown (bottom sheet). By default, DropdownItem uses closingMode="all", so tapping Upload closes parent dropdowns immediately. That unmounts the hidden <input type="file"> before the OS file picker returns. When the user comes back, the input no longer exists, so change never fires and upload does not start.
- Admin/internal users do not hit the same nested adaptive-dropdown path in this view
Solution:
- Set closingMode="'none'" on the Upload DropdownItem so the menu stays mounted while the native picker is open. After a file is selected and onFileInputChange starts upload, close the bottom sheet programmatically with: `window.dispatchEvent(new Event("popstate"))`
opw-5937105When a packed product is scanned with its lot and due date information, the system now correctly keeps the expiration date instead of replacing it with today’s date. This ensures lots created during barcode operations retain the right expiry information, which helps avoid inventory and delivery errors.
Original PR description
Issue
-----
Scanning a GS1 barcode containing:
- packaging
- lot
- due date
disregards the due date when creating the new lot.
Steps to reproduce
-----
- Enable GS1 nomenclature & packagings
- Create a product
- barcode 23456789012344
- packaging with barcode 01234567890128
- some on hand quantity
- Create a delivery for a full packaging of the product
- Open the delivery in barcode
- Scan 02 01234567890128 15 270101 10 LOT1
- Validate
- Open the lot
> Expiration date is set to today
Cause
-----
The code expects the product be scanned, there is no logic to retrieve it from the packaging when missing.
-----
Ticket:
opw-6073489
Forward-Port-Of: odoo/enterprise#114123
Forward-Port-Of: odoo/enterprise#112490This update fixes two issues affecting project creation from sales orders. It now correctly uses the delivery address for the project customer and avoids a conflict that could block creating FSM projects from a template. This makes the sales-to-project flow more reliable for users.
Original PR description
FIX 1: industry_fsm_sale: set delivery address on project customer] ----------------------- **Steps to reproduce:** - Create a product: - Product Type: Service - Service Tracking: Create on Order…
FIX 1: industry_fsm_sale: set delivery address on project customer] ----------------------- **Steps to reproduce:** - Create a product: - Product Type: Service - Service Tracking: Create on Order (project) - Project Template: FSM type project template - Confirm a sale order with this product - Check the generated project customer **Issue:** The customer's delivery address is not set on the generated project. **Fix:** Set the delivery address as the project customer when creating the project. [FIX] industry_fsm_sale: remove default sale line in fsm projects ------------ **Steps to reproduce:** - Install industry_fsm_sale - Create a project template of fsm type - Create a sale order (service-type product) - Confirm the sale order - Create a project and select the fsm-type project template - Create the project **Issue:** - SQL constraint is triggered, preventing project creation. **Fix:** - If the project template is of fsm type, remove the default sale line from the context. task-5074893
When a signed document from a project task or project is added to Documents, it now opens in the project’s configured folder instead of defaulting to My Drive. This keeps signed attachments organized consistently with regular project files and reduces manual filing.
Original PR description
Steps to Reproduce --- - Request a signature from a project task or project and complete the signing process. - In the chatter, click "Add to Documents" on the signed attachment. Issue --- Signed documents attached to projects or tasks default to "My Drive" when added to Documents, instead of using the project's configured Documents folder. Current Behaviour --- - Regular task/project attachments correctly preselect the project Documents folder. - Signed attachments fall back to "My Drive". Expected Behaviour --- Signed documents linked to projects or tasks should preselect the project's Documents folder, consistent with regular attachments. Fix --- Extend get_documents_operation_add_destination to handle sign.request attachments linked to project.task or project.project, resolving to the corresponding project Documents folder. task - 5226770
This change corrects the year shown in return names so date ranges display the actual calendar year. It prevents confusing labels like showing Jan 2022 instead of Jan 2023, which improves clarity for users reviewing reports and returns.
Original PR description
Steps to reproduce: - Create a return from Jan 2023 to April 2023 -> the dates displayed in the name will be Jan 2022 - Apr 2023 The display is incorrect because we used the wrong date format, and therefore switch from using YYYY to yyyy as the first one is the ISO standard year and the second the calendar year. They might differ on the result here because 01 Jan 2023 falls on a Sunday, but ISO week starts on Monday, so it took the previous year (2022)