Monday, May 18, 2026
24 changes · 19.0
Enhancements to existing features
Odoo can now accept wildcard-style folder patterns when configuring where add-ons are stored. This makes it simpler for teams managing several Odoo repositories under one location, reducing manual setup and maintenance.
Original PR description
Pass all addons_path entries through glob.glob(), which returns [path] for literal paths and expands patterns otherwise. This is useful when managing multiple Odoo repositories under a common root, avoiding the need to list each addons path explicitly.
This update removes an unnecessary lookup performed while handling Indian sales and invoices. It can make repeated imports faster and reduce avoidable database work, especially when processing large batches.
Original PR description
There is no need to do a query to get a random foreign state. This search can be performed many times during imports. While the query is generally not reading a lot of data, it is still doing a seq…
There is no need to do a query to get a random foreign state. This search can be performed many times during imports.
While the query is generally not reading a lot of data, it is still doing a seq scan because of the ORDER BY, while the query can be avoided completely.
```sql
EXPLAIN ANALYZE
SELECT "res_country_state"."id"
FROM "res_country_state"
WHERE "res_country_state"."code" NOT IN ('IN')
ORDER BY "res_country_state"."code", "res_country_state"."id"
LIMIT 1;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------
Limit (cost=84.93..84.94 rows=1 width=8) (actual time=0.450..0.450 rows=1 loops=1)
-> Sort (cost=84.93..90.49 rows=2224 width=8) (actual time=0.449..0.449 rows=1 loops=1)
Sort Key: code, id
Sort Method: top-N heapsort Memory: 25kB
-> Seq Scan on res_country_state (cost=0.00..73.81 rows=2224 width=8) (actual time=0.012..0.281 rows=2223 loops=1)
Filter: ((code)::text <> 'IN'::text)
Rows Removed by Filter: 2
Planning Time: 0.075 ms
Execution Time: 0.462 ms
```
This can be worse if when the table is not in the buffer.Resolved issues and error corrections
The My Team filter now includes employees who report indirectly through another manager. This helps managers get a complete view of their team hierarchy instead of missing lower-level team members.
Original PR description
Before this commit: If A is a manager of B and B is a manager of C, A cannot see C under My Team filter. Fix: Use is_subordinate. task-6204754 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
Miscellaneous changes
Manual commit due to Weblate merge conflict
Original PR description
Manual commit due to Weblate merge conflict
Forward-Port-Of: odoo/odoo#260483 Forward-Port-Of: odoo/odoo#260319
Returned stock valuation processing now uses the correct unit of measure for each individual valuation entry. This prevents errors when returns involve products measured in different unit categories, helping inventory and accounting workflows complete reliably.
Original PR description
#### Issue: Consuming stock valuation layers linked to returned moves could raise an error when the SVL recordset contained products from different UoM categories. #### Cause: `_consume_specific_qty()` and `_consume_all()` used `self.uom_id` inside per-record loops. When self contained SVLs from different UoM categories, self.uom_id was multi-record, causing quantity conversion to fail with: `ValueError: Expected singleton: uom.category(2, 6)` #### Fix: Use the UoM of the current SVL record during returned quantity conversion: - `candidate.uom_id` in `_consume_specific_qty()` - `svl.uom_id` in `_consume_all()` opw-6119427 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264174 Forward-Port-Of: odoo/odoo#259736
This fix prevents the invoice Send & Print flow from failing when an optional proforma PDF attachment was not created. Users can continue sending or printing invoices in cases where no fallback PDF is needed, improving reliability without changing normal behavior.
Original PR description
`_generate_and_send_invoices` raises `KeyError: 'proforma_pdf_attachment'` when `_get_invoice_extra_attachments` returns an empty recordset for a move in the `success` dict. The…
`_generate_and_send_invoices` raises `KeyError: 'proforma_pdf_attachment'` when `_get_invoice_extra_attachments` returns an empty recordset for a move in the `success` dict.
The `proforma_pdf_attachment` key is only populated in `_generate_invoice_fallback_documents`, which is called exclusively when `allow_fallback_pdf=True`. However, the code at the return step also triggers when `allow_fallback_pdf=False` (normal wizard path), where the key is never set.
Replace the bare dict access `move_data['proforma_pdf_attachment']` with `move_data.get('proforma_pdf_attachment', self.env['ir.attachment'])` so the flow returns an empty attachment recordset instead of raising a `KeyError` when no fallback proforma PDF was generated.
Fixes: KeyError: 'proforma_pdf_attachment' in account.move.send.wizard Steps to reproduce:
1. Use the Send & Print wizard on a posted invoice
2. Trigger a condition where _get_invoice_extra_attachments returns an empty recordset (e.g. via l10n_vn_edi_viettel with sinvoice files not yet fetched) despite no error being raisedDemo point-of-sale and restaurant orders now display sequential order references instead of the placeholder '/'. This makes sample data clearer and more realistic for demonstrations, training, and testing, while leaving new draft orders unchanged.
Original PR description
Before this commit: =================== - For demo orders, no proper Order Reference is displayed, by default, it is set to '/'. After this commit: =================== - All default '/' values are replaced with a sequential Order Reference, except for orders in the 'new' state . Task-6004716 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The mail message actions menu now uses a bottom sheet on touch devices such as tablets instead of showing a misplaced dropdown. This makes long-press actions in chatter easier and more reliable for users working on larger touch screens.
Original PR description
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
The IoT app's Test button has been corrected so it no longer triggers an unexpected error. This helps users verify IoT devices more reliably without encountering confusing failure messages.
Original PR description
This PR fixes the following traceback when using "Test" button in the iot app: ``` 2026-05-18 07:48:36,248 22727 ERROR ? websocket: error from callback <bound method WebsocketClient.on_message of <WebsocketClient(Thread-6, started daemon 3995071456)>>: list index out of range 2026-05-18 07:48:36,249 22727 ERROR ? odoo.addons.iot_drivers.websocket_client: websocket received an error: list index out of range ``` opw-6226014
This change adjusts the Point of Sale feedback step so custom behavior can be added more safely. It helps prevent order validation from completing when certain add-ons, such as fiscal device integrations, encounter an error.
Original PR description
In order to allow patching (in particular for FDM, where we don't want to finalize the validation of the order if there is an error), we extract the waiter method. see odoo/enterprise#104468
Sales teams can now re-enter a discount coupon code after opening the reward selection and then canceling it. This prevents a confusing error that said the code was already applied even though no discount reward had actually been added to the order.
Original PR description
Issue: --- ### Steps to reproduce: 1- Create a `Discount Code` program. 2- In SO, use `Coupon Code` wizard and use the code. 3- After available rewards are shown, discard the wizard. 4- Re-apply the code. Validation Error: The promo code is already applied. As the reward is not applied, this is functionally confusing. At this point We can see the reward only inside the rewards wizard view. If we allow re-apply the code in case no reward line is created for the `rule.program_id`, we can still see the reward by re-applying the same code, without any side effects. opw-6164198 Forward-Port-Of: odoo/odoo#264105 Forward-Port-Of: odoo/odoo#261950
PDF attachment previews now show the Print button again on desktop, making it easier for users to print documents directly from the preview window. Mobile safeguards remain in place for devices and browsers where printing controls can cause issues.
Original PR description
**Problem:** When opening a PDF attachment preview in v19+, the print button disappeared. As a result, the Print button is not accessible from the main toolbar. In v18 the buttons remained…
**Problem:** When opening a PDF attachment preview in v19+, the print button disappeared. As a result, the Print button is not accessible from the main toolbar. In v18 the buttons remained permanently visible. **Steps to reproduce:** - Open any record that has a PDF attachment in the chatter. - Click the PDF attachment to open the preview popup. - Observe toolbar buttons disappeared. **Cause:** commit responsible for this: https://github.com/odoo/odoo/commit/b7889d007f72c7e7f9f22318a9968338cde0ddb3 It was removed to prevent some bugs with some android/smartdevice and some old browsers `file_viewer.js` passes `hidePrint: true` to `hidePDFJSButtons()`. This was originally added alongside the mobile guard (`isMobileOS()`), but the `isMobileOS()` guard in `hidePDFJSButtons` already handles mobile, so the explicit `hidePrint: true` in `file_viewer.js` was redundantly hiding Print on desktop too. https://github.com/odoo/odoo/blob/654a1caafc2ab7b2841c372910b2e81dc6e9c035/addons/web/static/src/core/file_viewer/file_viewer.js#L60-L71 https://github.com/odoo/odoo/blob/654a1caafc2ab7b2841c372910b2e81dc6e9c035/addons/web/static/src/core/utils/pdfjs.js#L35-L37 **Fix:** - Remove `hidePrint: true` from `file_viewer.js` since mobile is already covered by the `isMobileOS()` check inside `hidePDFJSButtons()`. opw-6216534 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The blog editor now prevents users from changing the cover image, title, or subtitle shown in the “Next Post” section from the current blog post. This helps avoid accidental edits to a different post and keeps blog content management clearer and safer.
Original PR description
[*]: html_builder Issue: When viewing a blog post, the "Next Post" section allows editing the cover image, title, and subtitle of another post. Editing content that belongs to a different post from…
[*]: html_builder
Issue:
When viewing a blog post, the "Next Post" section allows editing the cover image, title, and subtitle of another post. Editing content that belongs to a different post from within the current one is incorrect.
Steps to reproduce:
* Open a blog post that has a "Next Post" section visible.
* Enter edit mode.
* Try to edit the cover image, title, or subtitle of the next post.
* These elements can be interacted with even though they should not be
editable.
Fix:
Make the "Next Post" section fully non-editable. The title and subtitle were already handled via content_not_editable_selectors, but the cover image could still activate builder options, allowing it to be replaced.
Introduce a new `not_activable_element_selectors` resource in the `BuilderOptionsPlugin` so that plugins can declare elements that should not trigger the builder overlay when clicked. Updated the builder to retrieve this selector list from plugin resources instead of using a hardcoded value.
task-5435878Updating a customer or vendor with the same parent company no longer triggers extra tax ID checks or accounting entry updates. This reduces avoidable API errors and improves performance for partner updates without changing normal behavior.
Original PR description
When updating a partner's parent_id, ensure the VAT check and move line updates are only triggered if the parent_id actually changes. This prevents unnecessary validations and side effects when writing the same parent_id value. This fix improves performance and avoids spurious errors when updating partners via the API. task-[6214466](https://www.odoo.com/odoo/project.task/6214466) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a technical issue that prevented the calculation of payslips when a payrun had no associated payslips. The fix ensures the system handles empty recordsets gracefully, preventing errors and maintaining accurate payroll processing. This improves the reliability of the Australian HR Payroll module.
Original PR description
If the payrun does not have any payslips, the _get_payslip_stp is called on an empty recordset, which causes the compute to fail. This commit fixes the _get_payslip_stp compute for empty recordset. task-6215823
This update simplifies access to Codabox transaction data. Previously, users needed write access to the company record, which wasn't necessary after the initial connection was established. This change streamlines the process and improves efficiency.
Original PR description
Currently, we use the `_l10n_be_codabox_verify_prerequisites` method before trying to fetch transactions. This method checks if the user has write access rights on res.company model which should not be mandatory to fetch transactions from codabox when the connexion is already created. opw-6108811 Forward-Port-Of: odoo/enterprise#117097
This update fixes inconsistencies in the XML structure used for Swedish bank payments (l10n_se_bban). Specifically, it ensures the correct format for mandatory fields and prioritizes the BIC over the ClrSysMmbId, improving compatibility with Nordea bank and other Swedish financial institutions. This ensures accurate and compliant payment processing.
Original PR description
Here is few fixes added to the swedish iso 20022 XML: - CdtrAgt seems to be always mandatory, change the condition in `_skip_CdtrAgt` to always use the CdtrAgt if payment_method is iso20022_se - The `_is_se_bban` is too restrictive, this should be always True when payment method is swedish iso - The `FinInstnId` node can either contain BIC or ClrSysMmbId. But as ClrSysMmbId seems to change from one bank to another, it's more relevant to always use the BIC. opw-5395736 Forward-Port-Of: odoo/enterprise#114662
This update fixes a visual issue where long accounting reports would cut off the final row, preventing users from seeing all the data. The fix involves adjusting styling to ensure the complete final row is always visible, regardless of the report's content. This improves the user experience and data accessibility for accounting reports.
Original PR description
Problem: When an accounting report fills a whole page, the final row is not fully visible Steps to reproduce: 1- View a tax report that has a lot of entries that would fill the whole screen 2- Notice how the last line is not fully visible and it isn't possible to scroll and view the rest of it Solution: Correctly style the different < div > elements opw-6171555
This update resolves an issue where Odoo was attempting to process GSTR2B attachments with missing data, leading to errors. The change ensures that attachments have valid content before being processed, preventing these errors and improving the reliability of tax reporting. This addresses a potential disruption in the import of Indian tax returns.
Original PR description
There may be databases contained GSTR2B JSON attachments whose metadata was still present in `ir.attachment`, but whose underlying binary content was missing from the filestore. This caused the matching flow to attempt processing invalid JSON payloads instead of moving the return to `error_in_fetching`. The condition validating JSON attachments now also checks that the attachment raw content exists before adding it to the payload list. opw-6088082
This update resolves an issue preventing non-administrator users from viewing the Users settings within the Enterprise module. The fix corrects a permission restriction that was blocking access to database user information. This enhancement ensures all users can manage user accounts effectively.
Original PR description
Steps:
- Create a user X with admin rights
- Connect as X
- Open Settings/Users
- Access right error
```
Failed to read field res.users.database_user_ids
You are not allowed to access 'Database User' (databases.user)
```
opw-6209241This update fixes a bug that occurred when generating audit reports. Specifically, a division by zero error arose when processing invoices with zero balances. The fix ensures accurate report generation by handling zero balances correctly, preventing the error and improving report reliability.
Original PR description
# How to reproduce - Create an invoice : - with a move line with a balance of 0 - for date X (e.g. 18/05/2026) - Go to Accounting > Review > Working Files - Create a new audit for the year following date X (e.g. from 01/01/2027 to 31/12/2027) - Go to the balances of that audit - Sort by Var % # The problem A traceback is shown, telling that there was a division by 0 # Cause When filtering by Var % (`audit_var_percentage`), the ORM will call `_field_to_sql` for that field and will use the override defined in `account_reports` : https://github.com/odoo/enterprise/blob/458e3c4b395485974c749955907a1f7310a896a8/account_reports/models/account.py#L229-L240 In this override, we divide by `COALESCE(prev_account_move_line.balance, 1)`, but `COALESCE` only replace the value by 1 if `balance` is `NULL`. When `balance = 0`, we divide by 0, which raises the error. opw-6165282
This update resolves an issue where users without write access to the Fiskaly Point of Sale (PoS) would receive an access error when attempting to authenticate with an expired token. The fix ensures that the correct access error is displayed, preventing disruptions to the sales process for users with limited permissions.
Original PR description
When trying to auth directly from the PoS when the token expires, if you are logged in with a user that doesn't have write access to the PoS. You would get an access error. Steps to reproduce: ------------------- * Setup Fiskaly in an AT company * Open PoS and try to make a sale * To fake the token expiration I modified the code so that the request always return 401 status code > Observation: You get an access error opw-5925203 Forward-Port-Of: odoo/enterprise#112474
This update corrects a technical issue where an approval rule was being applied incorrectly due to a duplicate XML ID. The change ensures that approval rules are applied correctly based on user and manager access levels, improving the reliability of the approval process. This resolves a potential inconsistency in how approvals were handled.
Original PR description
The XMLID `approval_approver_manager` was defined twice, causing the rule to be applied with the last evaluated access configuration for both `group_approval_user` and `group_approval_manager`. This commit renames the first occurrence of the duplicated XMLID to `approval_approver_user` to restore the intended separation between user-level and manager-level approval access rules. task-6095010 Forward-Port-Of: odoo/enterprise#113480
Original PR description
Forward-Port-Of: odoo/odoo#260483 Forward-Port-Of: odoo/odoo#260319