Monday, September 1, 2025
22 changes · 18.0
Enhancements to existing features
This update lets developers run selected Odoo tests directly from the shell after changing test code, reducing the need for full server restarts during debugging. It improves developer productivity and supports faster validation of changes, while business logic changes still require restarting the shell.
Original PR description
This commit introduces a new function `run_tests` to the Odoo shell. This function allows users to run specific tests directly from the shell, even after the test code is modified. This significantly…
This commit introduces a new function `run_tests` to the Odoo shell. This function allows users to run specific tests directly from the shell, even after the test code is modified. This significantly speeds up the debugging process by avoiding the need for a full server restart. In the odoo shell ``` >>> from odoo.tests.shell import * >>> run_tests(env, 'test_tags', modules=[module_name], reload_tests=True) ``` Note: `run_tests` automatically reloads test modules but does not reload Odoo model code. A shell restart is still required after any change to business logic. used by https://github.com/HydrionBurst/odoo-test-vscode for hot test vscode extension: [odoo-test-0.0.1.vsix.zip](https://github.com/user-attachments/files/22089685/odoo-test-0.0.1.vsix.zip) tutorial: https://github.com/HydrionBurst/odoo-test-vscode?tab=readme-ov-file#-hot-test 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#224048
Improved translations for Spanish Latin American language for some terms in MX localization task-4938338 target: 17.0 -> master Forward-Port-Of: odoo/enterprise#91875
Original PR description
Improved translations for Spanish Latin American language for some terms in MX localization task-4938338 target: 17.0 -> master Forward-Port-Of: odoo/enterprise#91875
Resolved issues and error corrections
This fix prevents an error in Spain's Veri*Factu electronic invoicing flow when a company has no tax ID recorded. It makes the batch sending check more reliable, avoiding interruptions caused by incomplete company setup.
Original PR description
Replaced `['NIF']` with `.get('NIF')` to avoid a `KeyError` when the company does not have a NIF.
When the VAT value is not set on the company and the `_send_as_batch_check` method is executed, the system raises an error from [1].
This PR updates the code to use `.get('NIF')` instead of direct access, making it more robust.
[1]: https://github.com/odoo/odoo/blob/dff2423ac320fdb97d6bf1f106dc84be1d71cac2/addons/l10n_es_edi_verifactu/models/verifactu_document.py#L1165
**sentry-6829500308**
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prDocumentation and clarification updates
This pull request records an individual contributor license agreement signature for hildickethan. It is an administrative legal update that helps ensure contributions can be accepted under Odoo's licensing terms, with no product or user-facing behavior changes.
Original PR description
I hereby agree to the terms of the Odoo Individual Contributor License Agreement v1.0. Forward-Port-Of: odoo/odoo#224747
Miscellaneous changes
This PR updates the Peruvian electronic invoicing configuration to reflect the recent brand change from Digiflow to Estela (formerly Digiflow). Changes: - Updated help texts and string labels in `res_company.py` - Adjusted references in `account_edi_format.py` - Updated translations in `es.po` This change is purely textual and does not affect logic or behavior. It ensures users see the correct branding across the Peruvian EDI settings. Forward-Port-Of: odoo/enterprise#86082 Forward-Por
Original PR description
This PR updates the Peruvian electronic invoicing configuration to reflect the recent brand change from Digiflow to Estela (formerly Digiflow). Changes: - Updated help texts and string labels in `res_company.py` - Adjusted references in `account_edi_format.py` - Updated translations in `es.po` This change is purely textual and does not affect logic or behavior. It ensures users see the correct branding across the Peruvian EDI settings. Forward-Port-Of: odoo/enterprise#86082 Forward-Port-Of: odoo/enterprise#85934
This fix ensures online point-of-sale payment orders send their order date in the expected universal time format. It helps prevent timezone-related mismatches between the customer-facing payment flow and the backend records.
Original PR description
In 2a5f1ab, we formatted the `order_date` with `toFormat(...)`, however, that transforms the date into local, while the backend expects it to be in UTC. In this commit, we set the date tz back to UTC before formatting it. opw-4942697
Return slips for returned deliveries are now generated in the customer's preferred language. This avoids confusion for customers and keeps return documentation consistent with their sales order language.
Original PR description
In this bug, the language of return label is not set properly. The return label should be in customer language. To reproduce: 1- Create a quote for a client with a specific lang, e.g. fr and and confirm the order 2- In Delivary, return the order 3- Print Return slip 4- As you can see the return label is in wrong language In this fix, we put the template inside a wrapper template. It makes it be translated correctly. opw-4945685
Journal entry numbers can no longer be changed directly from the list view when the entry is not in draft. This helps preserve accounting data integrity and prevents accidental edits to finalized entries.
Original PR description
**Issue** It was possible to edit the journal entry number in the list view even when the entry state was not 'draft'. **Steps to Reproduce** 1. Go to Accounting > Accounting > Journal Entries. 2. Select any journal entry. 3. Double-click on the Journal Number field and attempt to edit it. **Root Cause** The 'name' field in the list view did not have a readonly attribute, allowing inline editing regardless of the journal entry's state. Opw-5009421 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Deleting a group chat from the messaging menu is corrected so users no longer encounter an unexpected error. This improves reliability in the Discuss messaging experience and avoids disruption when managing conversations.
Original PR description
task-4860196
This fixes an issue where an empty PDF attached to a sales quote could trigger an error during validation. The system now skips the encryption check when there is no document content, helping quote setup and data loading complete reliably.
Original PR description
If the document is empty we don't need to check for encryption. Otherwise we risk getting an error. ``` Traceback (most recent call last): File "/home/odoo/src/odoo/18.0/odoo/tools/convert.py", line…
If the document is empty we don't need to check for encryption. Otherwise we risk getting an error.
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/18.0/odoo/tools/convert.py", line 544, in _tag_root
f(rec)
File "/home/odoo/src/odoo/18.0/odoo/tools/convert.py", line 444, in _tag_record
record = model._load_records([data], self.mode == 'update')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5500, in _load_records
data['record']._load_records_write(data['values'])
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5418, in _load_records_write
self.write(values)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 4827, in write
real_recs._validate_fields(vals, inverse_fields)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 1631, in _validate_fields
check(self)
File "/home/odoo/src/odoo/18.0/addons/sale_pdf_quote_builder/models/product_document.py", line 46, in _check_attached_on_and_datas_compatibility
utils._ensure_document_not_encrypted(base64.b64decode(doc.datas))
File "/home/odoo/src/odoo/18.0/addons/sale_pdf_quote_builder/utils.py", line 12, in _ensure_document_not_encrypted
if pdf.PdfFileReader(io.BytesIO(document), strict=False).isEncrypted:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/18.0/odoo/tools/pdf/__init__.py", line 91, in __init__
super().__init__(stream, strict)
File "/home/odoo/.local/lib/python3.12/site-packages/PyPDF2/_reader.py", line 317, in __init__
self.read(stream)
File "/home/odoo/.local/lib/python3.12/site-packages/PyPDF2/_reader.py", line 1408, in read
self._basic_validation(stream)
File "/home/odoo/.local/lib/python3.12/site-packages/PyPDF2/_reader.py", line 1449, in _basic_validation
raise EmptyFileError("Cannot read an empty file")
PyPDF2.errors.EmptyFileError: Cannot read an empty file
```
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-prThis fixes a crash that could happen when testing a CSV import containing an unsupported company-related field. Instead of failing with an error, the import test now handles the missing field conversion gracefully, helping users validate files without interruption.
Original PR description
The system will crash when we import a CSV with a field `employee_properties_definition` and click on `Test`. Steps to Produce: 1. Install `Employees`. 2. Go to Settings > User & Companies > Companies > Import Records. 3. Upload a file with the column title `employee_properties_definition` and provide any data. 4. Click on `Test`. Error:- `TypeError: 'NoneType' object is not callable`. Solution:- - To handle the case where the converter is `None`, resulting in a `TypeError`, I included TypeError in the `except` block. This ensures graceful handling when a field's converter is not properly defined. Sentry - 5854109138 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
When Greek MyDATA bill retrieval fails due to access or data issues, the system now records a warning instead of a full error traceback. This reduces unnecessary error noise for expected user-side problems and makes logs easier to review.
Original PR description
Currently, the system logs an error when a `RequestException` or `ValueError` occurs while fetching MyDATA bills.
**Error:**
`Something when wrong when fetching MyDATA bill: HTTPError('403 Client Error: Forbidden for url: https://mydataapidev.aade.gr/RequestDocs?mark=0&dateFrom=03%2F04%2F2025&dateTo=02%2F07%2F2025`
**Root Cause:**
At [1], using `_logger.error` for `RequestException` or `ValueError` causes unnecessary tracebacks for user-side issues, such as forbidden access.
[1]
https://github.com/odoo/odoo/blob/1b657cf1e1ce43874a3ede307b2f8ad68216aa56/addons/l10n_gr_edi/models/res_company.py#L54-L55
This commit ensures `RequestException` or `ValueError` are logged as warnings instead of `error`, preventing unnecessary tracebacks and correcting the `typo` in the log message.
sentry–6713444740The website editor now handles temporary connection problems when accessing Odoo's media service. This prevents a DNS or network hiccup from causing a visible error, making media browsing more reliable for users.
Original PR description
The error was probably caused by a temporary failure in DNS resolution, preventing the domain `media-api.odoo.com` from being translated into an IP address.
Error:
`ConnectionError: HTTPSConnectionPool(host='media-api.odoo.com', port=443): Max retries exceeded with url: /media-library/1/search (Caused by NameResolutionError('<urllib3.connection.HTTPSConnection object at 0x72ea796dfce0>: Failed to resolve 'media-api.odoo.com' ([Errno -2] Name or service not known)'))`
Solution:
- Wrapped the HTTP request in a `try-except` block to catch and handle request-related exceptions.
sentry-6544378472
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prWebsite setup now continues safely if the default homepage has been deleted. This avoids a crash during website creation and lets users complete configuration even when the original homepage record is no longer available.
Original PR description
The error occurred because the website.homepage view was deleted. When the website configurator attempted to access it, a ValueError was raised. Steps to replicate: - Initialize a DB without any apps installed. - Manually install website and wait till u reach `Website Configurator` page. - Duplicate the current window and search for `views`, search `homepage` and delete the first record that you find. - Go to `website > site > pages` and delete the record with page title as `Home`. - Go back to the page with website configurator and build the website. Error: `ValueError: No record found for unique ID website.homepage. It may have been deleted.` Solution: - Used `raise_if_not_found=False` with `viewref()` to avoid crashing if the homepage view is missing. - Safely skipped rendering the homepage instead of raising an error. sentry-6311940742 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Payment attempts using Adyen now handle unreachable or incorrectly configured API addresses without producing large technical error tracebacks. This keeps logs cleaner and helps teams focus on the underlying configuration issue instead of noisy system error reports.
Original PR description
Currently, an error occurs when the Adyen API endpoint is unreachable due to invalid domains or DNS resolution issues, the system logs a full traceback. **Error:** `ConnectionError:…
Currently, an error occurs when the Adyen API endpoint is unreachable due to invalid domains or DNS resolution issues, the system logs a full traceback.
**Error:**
`ConnectionError: HTTPSConnectionPool(host='000.adyen.com', port=443): Max
retries exceeded with url: /checkout/V71/paymentMethods (Caused by
NameResolutionError('<urllib3.connection.HTTPSConnection object at
0x7c4ec2c8f140>: Failed to resolve '000.adyen.com' ([Errno -2] Name or service
not known)'))`
**Root Cause:**
At [1] and [2], using `logger.exception` for `HTTPError` and `ConnectionError` causes unnecessary tracebacks for user-side issues like invalid API domains.
[1]
https://github.com/odoo/odoo/blob/bfb9c0141e595c97cd25ace1a219183cc213b0c4/addons/payment_adyen/models/payment_provider.py#L124-L127 [2]
https://github.com/odoo/odoo/blob/bfb9c0141e595c97cd25ace1a219183cc213b0c4/addons/payment_adyen/models/payment_provider.py#L132-L133
This commit ensures `ConnectionError` and `HTTPError` are logged as `warnings` instead of `exceptions`, preventing unnecessary tracebacks.
sentry - 4955120723Activating PEPPOL Electronic Invoicing no longer fails when a company profile has no country set. This helps users complete setup more reliably and avoids an unexpected error during configuration.
Original PR description
Currently, an error occurs when attempting to activate `PEPPOL Electronic Invoicing` without a country set on the company profile. **Steps to produce:** - Install `l10n_be` and `account_peppol` modules. - Switch to `BE Company CoA`. - Navigate to: `Settings > Users & Companies > Companies > BE Company CoA` and remove the `country name` from the `Address`. - Open `Settings`, search `'PEPPOL Electronic Invoicing'`, and click on `'Activate Electronic Invoicing'`. **Error:** `AttributeError: 'bool' object has no attribute 'upper'` **Root Cause:** At [1], `wizard.company_id.country_code` is `False`, and calling `.upper()` on it raises an `error`. [1] https://github.com/odoo/odoo/blob/c88c1e2f69c7cb25ac9c51d91ea7f47c9236e229/addons/account_peppol/wizard/peppol_registration.py#L83 This commit prevents error when user activate `PEPPOL Electronic Invoicing` and country is not set on company profile. Sentry – 6680941491
The website editor now handles incorrectly formatted web addresses more gracefully when users add image links. Instead of triggering a technical error, it shows a clear validation message so users can correct the URL by including the proper prefix such as http:// or https://.
Original PR description
Currently, an error occurs when the user adds an invalid URL without a scheme (e.g., http:// or https://). **Steps to produce:** - Install the `website` module. - Open the Website app and click `Edit`. - From the `Categories` section, drag and drop the `Images snippet` onto the page. - Double-click on the image. - In the `Documents` tab, enter `'www.kalkiranonlinestore.com'` in the `Add URL` field and click `Add URL`. **Error:** **MissingSchema: Invalid URL 'www.kalkiranonlinestore.com': No scheme supplied. Perhaps you meant https://www.kalkiranonlinestore.com?** **Root Cause:** At [1], the URL is missing a valid scheme (`http:// or https://`), causing an error. [1] https://github.com/odoo/odoo/blob/9f45d0de54f8349c18cabeb08be95c9b841b98b4/addons/html_editor/controllers/main.py#L255 This commit ensures an error message is raised when the user provides an invalid URL format. Sentry – 5967688614
Odoo no longer crashes when the Accounting Audit Trail menu item has been deleted or is unavailable. This keeps users from seeing an error page during normal navigation and makes the system more resilient to menu configuration changes.
Original PR description
Currently, If a user deletes the `account.account_audit_trail_menu` record from Settings → Technical → User Interface → Menu Items, ValueError is encountered.
**Steps to Reproduce:**
1) Install the `Accounting (account + accountant)` modules.
2) Activate Developer Mode, Navigate to `Settings → Technical → User Interface → Menu Items`.
3) Search for `Audit Trail` and **delete** the corresponding menu item.
4) Refresh any page.
**Error:**
ValueError: External ID not found in the system: account.account_audit_trail_menu** **Traceback (most recent call last)
**Root Cause:**
- The override of `_load_menus_blacklist()` unconditionally calls `env.ref('account.account_audit_trail_menu')`, which, by default, raises if that XML-ID is absent.
**Solution:**
- Use the `raise_if_not_found=False` flag on `env.ref()` and only append the menu ID when the reference actually exists.
Sentry-6590284629The Chilean electronic invoicing demo data now includes the required certificate identifier, preventing errors when users test sending invoices to the SII. This helps trial and training environments work out of the box without affecting production certificates.
Original PR description
**Issue** When installing l10n_cl_ed, the `subject_serial_number` field is left empty. This causes an error when attempting to send an invoice to the SII. **Steps to Reproduce** 1. Install Accounting and l10n_cl_edi 2. Create and confirm an invoice 3. Click "Send Now to SII" 4. Error: Invalid Operation **Root Cause** The `subject_serial_number` is not set during installation, and this field is required for electronic document generation. **Fix** Restore the behavior from version 17.0 by setting a default `subject_serial_number` if it's missing and the certificate is available. This ensures the demo data is functional and allows users to test the SII integration out-of-the-box. Opw-4961801
The rental checkout test now waits for the cart and page updates to finish before checking totals. This helps prevent false build failures caused by timing issues, improving confidence in the rental sales flow.
Original PR description
steps to reprduce: 1. duplicate multi enterprise 18.0 database 2. run the tour `website_sale_change_rental_duration` in the duplicated database inspired from: https://github.com/odoo/enterprise/commit/c7542e897c537650966497065db9c7d033dcb8ee added a delay to wait when choosing the rental duration, after page is loaded when go to cart , check if the next page is loaded before checking untaxed amount build_error-227718
Users checking the latest AFIP rate with expired or invalid certificate credentials will no longer hit a confusing system error. The process now blocks the action when credentials are invalid, helping Argentine localization users understand and resolve the issue more reliably.
Original PR description
An error occurs when a user attempts to check the latest AFIP rate while their certificate has expired and the certificate key is null. **Error:** `TypeError: argument should be a bytes-like object or ASCII string, not 'bool'` **Root Cause:** When the user tries to check the `latest AFIP rate` with an expired certificate and a certificate key having invalid or null `pem_key`, the system attempts to access `pem_key` at [1], causing a `TypeError`. [1]- https://github.com/odoo/enterprise/blob/b185bd5bf9bb828fca83330ed4bde4ef8c9aa726/l10n_ar_edi/models/certificate.py#L54 **Solution:** This commit prevents error by ensuring that user cannot check `latest AFIP rate` with invalid credentials. Sentry-6640198098
Spreadsheet pivots now avoid offering fields that cannot be grouped, preventing a crash when users choose the Analytic Distribution field on sales order lines. This keeps spreadsheet reporting more reliable and avoids disruption while building pivot views.
Original PR description
…elds Steps to reproduce: - Create a spreadsheet with a pivot on Sales Order Lines - Add "Analytic Distribution" as column => Boom Task-5055300