Daily updates from Odoo
Friday, October 3, 2025
110 changes
15 changes
Resolved issues and error corrections
The Helpdesk “Ask the community” button now sends users to the correct forum page instead of a missing page. This prevents a 404 error for teams using community forums and keeps customers on the intended support path.
Original PR description
Scenario:
- create a helpdesk team
- enable community forum on it
- go to the team and click on "Ask the community"
Result: 404 error, this page does not exist
Cause: we are using helpdesk.team ID in route needing a forum.forum ID
Fix: uses /helpdesk/{team ID}/forums route instead of /forum/{team ID}
opw-5027193
Forward-Port-Of: odoo/enterprise#96026This update adds automated checks for formatting shortcuts such as bold, italic, underline, and strikethrough when no text is selected. It helps ensure the editor handles these actions cleanly without creating unnecessary undo steps, improving reliability for users writing or editing content.
Original PR description
Description of the issue this PR addresses: This PR adds test cases for formatting shortcuts (e.g., Ctrl+B) on a collapsed selection. An empty inline tag is inserted temporarily and auto-cleaned if unused, so no individual history step are created. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#229429 Forward-Port-Of: odoo/odoo#229233
This update adds extra logging to a background notification test that has been failing unpredictably. The added diagnostics should help developers identify the root cause faster, with no expected impact on everyday users.
Original PR description
The `test_postcommit` test ensures that the creation of several bus records result in a single postgres notify after commit. This test have been failing in a non deterministic fashion for some time. Theorical fixes have been try, but fails still persist. This commit adds some logs to this test to better understand what's happening. runbot-232798 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#228996
This change removes an unnecessary database rule from the Mail discussion channel setup. It helps prevent failures when creating or migrating future databases on PostgreSQL 18, with no expected change for everyday users.
Original PR description
The field is `required=True`, which automatically sets it `NOT NULL` (if possible). The constraint does not do anything useful. Furthermore, pg18 promoted `NOT NULL` to "real" named constraints[1],…
The field is `required=True`, which automatically sets it `NOT NULL` (if possible). The constraint does not do anything useful.
Furthermore, pg18 promoted `NOT NULL` to "real" named constraints[1], and the constraint was created following the pattern pg uses, so trying to migrate a database to pg18 (either upgrading a cluster from 17 to 18 or restoring a db on a pg18) the restoration fails with
duplicate key value violates unique constraint "pg_constraint_conrelid_contypid_conname_index"
The easiest fix is to delete the constraint in the upstream DB if possible (I didn't find a way to filter out constraints from pg_dump or pg_restore, though it should be possible to filter it out from a "plain" dump by hand).
AFAIK Odoo does not generally drop constraints so I don't think this will fix existing databases, but it at least makes future databases compatible with pg18.
[1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=a379061a22a8fdf421e1a457cc6af8503def6252
Forward-Port-Of: odoo/odoo#229539
Forward-Port-Of: odoo/odoo#229274The click-and-collect checkout test was adjusted to focus on confirming public access behavior instead of recreating a timing-sensitive shopping flow. This reduces inconsistent automated test results and helps keep checkout validation dependable without changing customer-facing functionality.
Original PR description
Tours are too fast for imitating the user actions that led to sometimes creating 2 orders in parallel instead of reusing the first created. The test was added for b395f984b13eb83310024b9fa94d7822211ef8c1 fix, so with this commit, we keep the test more specific to the fix and avoid inconsistent behavior. Forward-Port-Of: odoo/odoo#229630 Forward-Port-Of: odoo/odoo#218417
This fix restores tooltip text when users hover over custom text fields added to sale order lines through Studio. It helps users see full cell contents again in the sales order line list, improving usability without changing business workflows.
Original PR description
## Versions 18.0+ ## Issue No tooltip can be displayed on Sale Order Lines. ## Steps to reproduce *Install Studio* - Open any SO; - Open Studio: - Click "Edit List view" on the Order Lines table; - Add a "Text" field in the columns; - Close Studio. - Add a product line if none: - Write something in the new column added with Studio; - Hover that cell and see no tooltip appear ## Cause https://github.com/odoo/odoo/blob/4daf4824a70ef679f65d5cbb15d71bc55c1e760e/addons/web/static/src/views/list/list_renderer.xml#L250 The template calls `getCellTitle` which returns a formatted text but has been overridden. These methods call the original `getCellTitle` method but don't return the formatted value. opw-4921113 Forward-Port-Of: odoo/odoo#229390 Forward-Port-Of: odoo/odoo#225550
This update corrects a reporting query in Timesheets and Attendance so employee records are matched properly during processing. It prevents certain database errors that blocked upgrade requests, helping upgrades complete more reliably.
Original PR description
In the affected query, the variable "employee_id" is undefined in the scope where it is used. This leads postgres to interpret it as a variable with default type VARCHAR and to the impossibility to compare it against an integer. We just qualify the variable name so it now works as expected. Failing upgrade requests: [3103245](https://upgrade.odoo.com/odoo/request/3103245) [3121291](https://upgrade.odoo.com/odoo/request/3121291) Fixes https://github.com/odoo/odoo/pull/192434/commits/c97ecfa7fc091f763329af589b69db2292931163 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#225401
Corrects how return report period settings are matched when reports include sections. This helps ensure users see the right reporting periods and avoids incorrect behavior in section-based financial reports.
Original PR description
The _init_options_return_periodicity would compare the report_id with self.id, which would lead to bugs in the case of reports with sections since in those cases it's the section id that's taken into account. Added that check. Also backported https://github.com/odoo/enterprise/pull/93187 's fix. Forward-Port-Of: odoo/enterprise#96115
This update makes Chilean bank data use a stable country reference instead of relying on the country name. It prevents installation or upgrade failures when the Chile country name has been changed in a database.
Original PR description
`res.country` records are `noupdate` by default, which means that changes such as the following are not reverted: ```SQL pied@(none):pied_3131231> SELECT c.name->>'en_US' FROM res_country c JOIN…
`res.country` records are `noupdate` by default, which means that changes such as the following are not reverted:
```SQL
pied@(none):pied_3131231> SELECT c.name->>'en_US' FROM res_country c JOIN ir_model_data d ON d.res_id = c.id AND d.model = 'res.country' AND d.module = 'base' AND d.name IN ('cl', 'co')
+----------+
| ?column? |
|----------|
| COLOMBIA |
| Colombia |
+----------+
```
Note: in this specific, the change is clearly an error introduced in the data. Still, the error it produces (which follows) can be avoided by referring to the xmlid, instead of the record name.
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/saas-18.4/odoo/service/server.py", line 1410, in preload_registries
registry = Registry.new(dbname, update_module=update_module, install_modules=config['init'], upgrade_modules=config['update'])
File "<decorator-gen-6>", line 2, in new
File "/home/odoo/src/odoo/saas-18.4/odoo/tools/func.py", line 89, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/saas-18.4/odoo/orm/registry.py", line 175, in new
load_modules(
File "/home/odoo/src/odoo/saas-18.4/odoo/modules/loading.py", line 455, in load_modules
load_module_graph(
File "/home/odoo/src/odoo/saas-18.4/odoo/modules/loading.py", line 226, in load_module_graph
load_data(env, idref, 'update', kind='data', package=package)
File "/home/odoo/src/odoo/saas-18.4/odoo/modules/loading.py", line 79, in load_data
tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
File "/home/odoo/src/odoo/saas-18.4/odoo/tools/convert.py", line 624, in convert_file
convert_csv_import(env, module, pathname, fp.read(), idref, mode, noupdate)
File "/home/odoo/src/odoo/saas-18.4/odoo/tools/convert.py", line 680, in convert_csv_import
raise Exception(env._(
Exception: Module loading l10n_cl failed: file l10n_cl/data/res.bank.csv could not be processed:
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
```
upg-3131231
Forward-Port-Of: odoo/odoo#229435
Forward-Port-Of: odoo/odoo#229218Prices for rental products on the website now display using the correct number of decimal places configured for the currency. This prevents customers from seeing unnecessary decimals, such as showing two decimal places when the business has set prices to whole numbers.
Original PR description
Versions -------- - 17.0 Steps ----- 1. Set currency precision to 0 decimals; 2. check prices in eCommerce as public user. Issue ----- Prices are displayed with 2 decimals Cause ----- The `_priceToStr` method used, always uses a `precision` of 2, except in editor mode when it will retrieve a different value from a hidden `.decimal_precision` element. Solution -------- Add the website's currency precision to `combination_info` via the controller, and use this value in `_priceToStr`. opw-4996878 Community PR: https://github.com/odoo/odoo/pull/224429 Forward-Port-Of: odoo/enterprise#95968 Forward-Port-Of: odoo/enterprise#95634
Point of Sale now ignores keyboard input when customers or cashiers use system and browser shortcuts such as zooming or tab navigation. This prevents accidental quantities or values from being added to order lines, improving checkout reliability.
Original PR description
Before this commit, the NumberBuffer was listening to all keyup events. This caused unintended behavior when the user pressed browser/system shortcuts such as: - `Ctrl +` / `Ctrl -` on Windows/Linux (zoom in/out) - `⌘ +` / `⌘ -` on macOS (zoom in/out) - `Alt + <number>` or `Alt + <arrow>` (browser tab navigation, menu accelerators) Because the key itself (e.g. `"+"`, `"-"`, `"1"`) was part of `INPUT_KEYS`, the NumberBuffer captured the event and updated its state leading to unexpected inputs being added to the PoS order lines. opw-4965429 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#227429
This fixes an internal automated test for the bank reconciliation widget by checking the correct interface element. It helps prevent occasional false test failures, supporting more reliable releases without changing user-facing behavior.
Original PR description
The step checks the non presence of `o_bank_rec_quick_create`. But this element does not exist, as it should be `o_bank_reconciliation_quick_create`. This causes the tour to sometimes fail as we click on unfold before the interface updates from the creation of the line. runbot-error-230727 Forward-Port-Of: odoo/enterprise#95359
This fixes a crash that could happen when an email or record contained an image formatted with a figure but no caption. Users can now open affected Helpdesk tickets and similar content normally, even when the image has no caption text.
Original PR description
When a image that has a figure tag without fig caption tag is rendered in a caption area it create a traceback. ### Steps to reproduce: * Write an email with an image that has a "figure" tag but no "fig caption" * Send it to an helpdesk alias to create a ticket * Open the ticket -> traceback ### Issue: When a "figure" tag was processed, it wasn't taking into account the possibility of not having "figcaption" which created the traceback. https://github.com/odoo/odoo/blob/2769717bb0632ee7b813e131a94e77885b54493f/addons/html_editor/static/src/others/embedded_components/plugins/caption_plugin/caption_plugin.js#L56-L59 opw-5080370
This fixes an internal test for translation exports so it runs faster and more reliably. It reduces false failures in automated checks, helping development and releases proceed with less interruption.
Original PR description
Spawning an Odoo instance goes beyond testing the i18n command. We just need to see if given the right command, something gets actually exported. So, we got rid of all complexity, and just avoided subprocessing, wiring directly to the command itself, in the current process. This removes timeout problems and a lot of undeterminism. [link](https://runbot.odoo.com/odoo/error/227540) runbot-227540
This fix restores the intended behavior of an internal notification test so it only considers notifications from the relevant database. It helps prevent misleading test failures and keeps release validation more reliable without changing customer-facing functionality.
Original PR description
In [1], logs were added to the `test_postcommit` test in order to better understand why it sometimes fails. However, this commit changed the test behavior: we only care about notify coming from the DB executing the test, but the `channel` variable is filled regardless of the DB the notification comes from. [1]: https://github.com/odoo/odoo/pull/229106 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#229844
20 changes
Resolved issues and error corrections
The Ask the Community button now opens the correct forum page for a helpdesk team instead of showing a page-not-found error. This helps customers and support users reach the community forum smoothly when forum support is enabled.
Original PR description
Scenario:
- create a helpdesk team
- enable community forum on it
- go to the team and click on "Ask the community"
Result: 404 error, this page does not exist
Cause: we are using helpdesk.team ID in route needing a forum.forum ID
Fix: uses /helpdesk/{team ID}/forums route instead of /forum/{team ID}
opw-5027193
Forward-Port-Of: odoo/enterprise#96026This change adds extra diagnostic logging to an internal bus notification test that has been failing unpredictably. It helps developers understand and resolve the intermittent test issue without changing business functionality.
Original PR description
The `test_postcommit` test ensures that the creation of several bus records result in a single postgres notify after commit. This test have been failing in a non deterministic fashion for some time. Theorical fixes have been try, but fails still persist. This commit adds some logs to this test to better understand what's happening. runbot-232798 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#228996
This removes an unnecessary database rule from Odoo's mail discussion channels. The change helps prevent failures when creating or restoring future databases on PostgreSQL 18, without changing how users interact with the mail app.
Original PR description
The field is `required=True`, which automatically sets it `NOT NULL` (if possible). The constraint does not do anything useful. Furthermore, pg18 promoted `NOT NULL` to "real" named constraints[1],…
The field is `required=True`, which automatically sets it `NOT NULL` (if possible). The constraint does not do anything useful.
Furthermore, pg18 promoted `NOT NULL` to "real" named constraints[1], and the constraint was created following the pattern pg uses, so trying to migrate a database to pg18 (either upgrading a cluster from 17 to 18 or restoring a db on a pg18) the restoration fails with
duplicate key value violates unique constraint "pg_constraint_conrelid_contypid_conname_index"
The easiest fix is to delete the constraint in the upstream DB if possible (I didn't find a way to filter out constraints from pg_dump or pg_restore, though it should be possible to filter it out from a "plain" dump by hand).
AFAIK Odoo does not generally drop constraints so I don't think this will fix existing databases, but it at least makes future databases compatible with pg18.
[1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=a379061a22a8fdf421e1a457cc6af8503def6252
Forward-Port-Of: odoo/odoo#229539
Forward-Port-Of: odoo/odoo#229274Website pricelist snippets now keep the correct spacing and text size when descriptions are regenerated in the page builder. This prevents product descriptions from appearing too large or too close to titles, keeping website layouts polished and consistent.
Original PR description
New description paragraphs generated by the builder for the "pricelist" snippets were missing two expected classes. - "mt-2" was never applied, so all pricelist variants lacked the vertical spacing below product titles. - The boxed and cafe snippets also needed the `o_small` class to keep their text size consistent. Steps to see the missing "o_small": 1. Drop an "s_pricelist_boxed" or "Pricelist Cafe" snippet on a page. 2. Use Backspace to delete the text already present in one of the descriptions. 3. Toggle the "Descriptions" option off and on; the regenerated paragraph appears larger than expected because `o_small` is absent. task-5117864 Forward-Port-Of: odoo/odoo#229464
This update corrects an automated test step for the bank reconciliation interface so it waits for the right screen element. This helps prevent false test failures and improves confidence that the accounting workflow remains stable.
Original PR description
The step checks the non presence of `o_bank_rec_quick_create`. But this element does not exist, as it should be `o_bank_reconciliation_quick_create`. This causes the tour to sometimes fail as we click on unfold before the interface updates from the creation of the line. runbot-error-230727
Point of Sale preparation screens now display any free-text custom attribute entered for a product, matching what already appears on receipts. This helps staff see complete order details and reduces the risk of preparing items incorrectly.
Original PR description
Steps to reproduce: ------------------- 1. Create a PoS product with an attribute of type "Radio", name it "X", and add a value to it, name it "Y", with the "Free text" option selected. 2. From PoS, click the product, for the attribute "X", select the value "Y", and enter some text in the text input area "blabla". 3. Order the product. Observation: On the preparation display, only the attribute name and value are display, but not the entered text, i.e. "X: Y" instead of "X: Y: blabla". Fix: ---- We now show the custom value (free text) if any. This matches what's been shown on the receipt in PoS. opw-5111768
The ESG demo data was adjusted so it no longer depends on accounting records tied to a specific country setup. This prevents errors when loading demo data in fresh databases using India or other fiscal localizations, making setup more reliable.
Original PR description
**Note: issue not reproducible in runbot, but in fresh database** **Step to reproduce:** - in fresh database, install esg module - go to setting > invoicing > add india as Fiscal Localization -…
**Note: issue not reproducible in runbot, but in fresh database**
**Step to reproduce:**
- in fresh database, install esg module
- go to setting > invoicing > add india as Fiscal Localization
- change company name, ex "test"
- goto setting > load demo data
**Observation:**
- You will receive traceback
```
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /home/odoo/odoo/codebase/enterprise/saas-18.4/esg/demo/demo_data.xml:567, somewhere inside
<record id="esg_emission_factor_line_assignation_4" model="esg.assignation.line">
<field name="esg_emission_factor_id" ref="esg_zero_emission_factor"/>
<field name="account_id" model="account.account" search="[('code', '=', '630000')]"/>
</record>
2025-09-11 08:45:07,458 82617 INFO esg184 odoo.addons.base.models.ir_module: module esg: no translation for language en_IN
2025-09-11 08:45:07,479 82617 ERROR esg184 odoo.sql_db: bad query: b'INSERT INTO "esg_activity_type_esg_emission_factor_rel" ("esg_emission_factor_id", "esg_activity_type_id") VALUES (1, 2) ON CONFLICT DO NOTHING'
ERROR: insert or update on table "esg_activity_type_esg_emission_factor_rel" violates foreign key constraint "esg_activity_type_esg_emission_fact_esg_emission_factor_id_fkey"
DETAIL: Key (esg_emission_factor_id)=(1) is not present in table "esg_emission_factor".
```
**Cause:**
- The demo data relies on few account.account record which belong to [USA company](https://github.com/odoo/odoo/blob/9805d09dff64de835de0c764da8c6e213d6b88aa/addons/account/data/template/account.account-generic_coa.csv#L38)
https://github.com/odoo/enterprise/blob/b8a20b02e27322d0db5781f8d84946e54bbcbf03/esg/demo/demo_data.xml#L569
https://github.com/odoo/enterprise/blob/b8a20b02e27322d0db5781f8d84946e54bbcbf03/esg/demo/demo_data.xml#L620-L628
- when we installed `india` Localization and changed the company name, USA company could not be created when loading demo data and hence the account records were not created, causing traceback
**Fix:**
- make demo data independent of any localization
opw-5048417A test related to SEPA credit transfers was corrected to follow the proper account number update process. This helps keep automated checks reliable and reduces the risk of issues when maintaining payment functionality.
Original PR description
Direct update sanitized_acc_number is not allowed. Forward-Port-Of: odoo/enterprise#95477 Forward-Port-Of: odoo/enterprise#72508
A Chilean electronic invoicing test now skips safely when optional demo data is not installed. This prevents false test failures in environments without demo data and helps keep validation runs consistent.
Original PR description
The test `test_demo_certificate_serial_number` failed when running without demo data, since the XMLID `l10n_cl_edi.l10n_cl_demo_certificate` is only present in demo mode. This commit updates the test to use `raise_if_not_found=False` and skip gracefully when the demo certificate is not available. The assertion now only runs if the certificate exists, ensuring the test passes consistently both with and without demo data. [RB-231573](https://runbot.odoo.com/odoo/error/231573)
Online rental product prices now use the website currency's configured decimal precision instead of always showing two decimals. This keeps public eCommerce prices consistent with business currency settings and avoids confusing price displays.
Original PR description
Versions -------- - 17.0 Steps ----- 1. Set currency precision to 0 decimals; 2. check prices in eCommerce as public user. Issue ----- Prices are displayed with 2 decimals Cause ----- The `_priceToStr` method used, always uses a `precision` of 2, except in editor mode when it will retrieve a different value from a hidden `.decimal_precision` element. Solution -------- Add the website's currency precision to `combination_info` via the controller, and use this value in `_priceToStr`. opw-4996878 Community PR: https://github.com/odoo/odoo/pull/224429 Forward-Port-Of: odoo/enterprise#95968 Forward-Port-Of: odoo/enterprise#95634
Website product prices now display using the correct currency precision, so currencies configured without decimals no longer show unnecessary cents. This keeps storefront pricing consistent for shoppers and website editors.
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Set currency rounding of EUR to 1.0; 2. use the currency on a website pricelist; 3. go to a product page in /shop; 4. open the url in a new session. Issue…
Versions -------- - 17.0+ Steps ----- 1. Set currency rounding of EUR to 1.0; 2. use the currency on a website pricelist; 3. go to a product page in /shop; 4. open the url in a new session. Issue ----- From the editor, the price gets displayed as expected, with no decimals. In the new session, the price gets displayed with two decimals. Cause ----- The `_priceToStr` method used, always uses a `precision` of 2, except in editor mode when it will retrieve a different value from a hidden `.decimal_precision` element. Solution -------- Add the website's currency precision to `combination_info` via the controller, and use this value in `_priceToStr`. For the product configurator, store the currency precision in the `.js_price_total` element's dataset. Also insert the precision in the `.oe_price` element's dataset, allowing it to be used as a fallback in case the configurator template isn't up to date. opw-4996878 Forward-Port-Of: odoo/odoo#229416 Forward-Port-Of: odoo/odoo#224429
This fixes an error that occurred when users switched Odoo to Italian while working with Italian tax returns. The Submit button is now identified in a language-independent way, preventing crashes for Italian-language users.
Original PR description
Steps: - Install 'l10n_it_xml_export' and switch to an Italian company - Install the Italian language - In Accouting Dashboard, configure the Tax Returns - Open the Tax Returns - Make sure you have a button 'Submit', review something if necessary - Switch the language to Italian - Traceback The xpath uses `text()` to select the element but the text in views is translated so the xpath does not work in all languages except English. We remove the check on text, `@name='action_submit'` should be enough. Ticket [link](https://www.odoo.com/odoo/project.task/5106966) opw-5106966
This fixes date-related inconsistencies in Mexican electronic invoicing sale tests by aligning expected payment policy behavior. It helps ensure automated checks remain reliable when timezone differences shift invoice dates around month-end.
Original PR description
### Steps to reproduce - In `l10n_mx_edi/tests/common.py`, change `cls.frozen_today` to any value between `2025-10-01 00:00:00` and `2025-10-01 05:59:59` - Run the `:TestCFDIInvoiceSale` tests - The…
### Steps to reproduce - In `l10n_mx_edi/tests/common.py`, change `cls.frozen_today` to any value between `2025-10-01 00:00:00` and `2025-10-01 05:59:59` - Run the `:TestCFDIInvoiceSale` tests - The tests fail because the payment policy is PPD whereas the expected XML has PUE ### Diagnosis The `sale.advance.payment.inv` wizard creates an invoice with `invoice_date_due = '2025-10-01'` but at post, we assign `invoice_date = '2025-09-30` due to this line: https://github.com/odoo/enterprise/blob/1f3c82635ee162987cf08490d447ad6d4121be4d/l10n_mx_edi/models/account_move.py#L838 As a result, the due date is in the month after the invoice date, so PPD is used as payment policy. ### Solution Force PPD by setting the due date to be 40 days after the invoice date, for consistency with the tests in `l10n_mx_edi`. #### Other solutions considered We could change the timezone in the context of the wizard, to make sure the due date is exactly the same as the invoice date, and keep PUE everywhere. runbot-233041
The messaging app no longer shows the translate option on messages that have no text, such as tracking updates or attachment-only messages. This avoids a confusing action that previously did nothing and keeps message options relevant to the content shown.
Original PR description
**Current behavior before PR:** The translate action was shown on all messages, including those with an empty body such as tracking updates or messages containing only attachments. Clicking the translate action on these messages had no effect. **Desired behavior after PR is merged:** The translate action is hidden for messages with an empty body. Only messages containing text display the translate option. **Task-5106303** --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#229595 Forward-Port-Of: odoo/odoo#228137
The sales planning test tour no longer depends on the current calendar date, which could fall on a non-working day and cause false failures. This makes automated checks more reliable without changing the business workflow for users.
Original PR description
Before this commit, the tour was failing on non-working days as the focused day was the current date. This commit removes the focus on the current date so that only working dates are selected. Additionally, this commit also fixes the formatting issues of the modified file. runbot error 226741
Messages that have already been received through another channel are now treated quietly when a later notification arrives. This prevents unnecessary chat windows from opening after the user has already seen the message in Discuss.
Original PR description
Before this commit, if a message was already received in the store by another medium than the bus, it was still handled not-silently when receiving the bus notification `discuss.channel/new_message`. This could lead to opening a chat window when a message was already seen by the user in the discuss app. This commit changes the handling of new messages in the frontend and overrides the silent flag when the record already exists. fixes-runbot-230700 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Discount allocation settings now allow other income and other expense accounts to be selected. This prevents valid accounting accounts from being excluded, helping businesses configure discounts more accurately.
Original PR description
With this PR: - Updated the domain of discount allocation fields to include `income_other`/`expense_other` account types. Task-5121917 Forward-Port-Of: odoo/odoo#229026
The Danish Nemhandel journal dashboard now uses the shared fetching tool for retrieving statuses and bills. This keeps the user experience consistent and reduces module-specific handling for the same business action.
Original PR description
We can use the common tool to fetch status or bills for nemhandel --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an internal automated test so it only reacts to notifications from the database being tested. It helps keep Odoo's messaging infrastructure checks reliable without changing customer-facing behavior.
Original PR description
In [1], logs were added to the `test_postcommit` test in order to better understand why it sometimes fails. However, this commit changed the test behavior: we only care about notify coming from the DB executing the test, but the `channel` variable is filled regardless of the DB the notification comes from. [1]: https://github.com/odoo/odoo/pull/229106 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#229844
Mexican electronic invoices will no longer automatically replace a missing invoice date with the current date in the Mexico City timezone when posted. This avoids inconsistent invoice and due dates and makes invoice behavior more predictable.
Original PR description
At the moment, when an invoice that uses a CFDI is posted, the invoice date (if not already existing) is set to the current date in the Mexico City timezone. This default behaviour is just weird, and even if there might have been technical reasons for it in the past, these are no longer valid. This can also cause the default invoice date to be different from the default due date, which causes unexpected behaviour in tests. We therefore remove this override. runbot-233041
7 changes
Resolved issues and error corrections
Rental product prices on the website now display using the currency's configured decimal precision. This prevents customers from seeing unnecessary decimal places when a business uses whole-number pricing, improving consistency and trust at checkout.
Original PR description
Versions -------- - 17.0 Steps ----- 1. Set currency precision to 0 decimals; 2. check prices in eCommerce as public user. Issue ----- Prices are displayed with 2 decimals Cause ----- The `_priceToStr` method used, always uses a `precision` of 2, except in editor mode when it will retrieve a different value from a hidden `.decimal_precision` element. Solution -------- Add the website's currency precision to `combination_info` via the controller, and use this value in `_priceToStr`. opw-4996878 Community PR: https://github.com/odoo/odoo/pull/224429 Forward-Port-Of: odoo/enterprise#95914 Forward-Port-Of: odoo/enterprise#95634
The Indian GST reporting tests now cover sales involving reverse charge tax and SEZ supplies with LUT. This helps reduce the risk of incorrect GSTR-1 reporting for businesses using these tax scenarios.
Original PR description
Adding GSTR1 test case with RCM tax and SEZ (with LUT) see https://github.com/odoo/odoo/pull/213931 Forward-Port-Of: odoo/enterprise#87486
Tests were updated to match a recent change in how suggested email recipients are returned. This keeps automated checks reliable across Helpdesk, HR Contract Salary, and Studio without changing end-user behavior.
Original PR description
From the related community commit, the _message_add_suggested_recipient method is modified to also return display name under certain condition. This commit adapts the test inside web_studio to align with the method's change. Task-4812554 Forward-Port-Of: odoo/enterprise#91003
This update adjusts an automated test for SEPA credit transfers so it follows the current rules for bank account data handling. It helps keep payment-related quality checks reliable without changing day-to-day user workflows.
Original PR description
Direct update sanitized_acc_number is not allowed. Forward-Port-Of: odoo/enterprise#95477 Forward-Port-Of: odoo/enterprise#72508
The Helpdesk customer portal link for asking the community now sends users to the correct forum page instead of a missing page. This prevents customers from hitting a 404 error when a helpdesk team has community forum support enabled.
Original PR description
Scenario:
- create a helpdesk team
- enable community forum on it
- go to the team and click on "Ask the community"
Result: 404 error, this page does not exist
Cause: we are using helpdesk.team ID in route needing a forum.forum ID
Fix: uses /helpdesk/{team ID}/forums route instead of /forum/{team ID}
opw-5027193
Forward-Port-Of: odoo/enterprise#96026Payroll PDF generation now skips document creation when an employee is missing the required contact record. This prevents scheduled payroll document generation from failing and helps payroll teams continue processing payslips smoothly.
Original PR description
Currently an error occurs when the **'Payroll: Generate pdfs'** scheduled action runs and tries to create a document for a payslip belonging to an employee who does not have a related partner.…
Currently an error occurs when the **'Payroll: Generate pdfs'** scheduled action runs and tries to create a document for a payslip belonging to an employee who does not have a related partner. **Prerequisites:** - Ensure HR is enabled in `settings>Documents` **Steps to Reproduce:** 1) Install `documents_hr_payroll` module.(with Demo) 2) Navigate to the Employees App. 3) Select any Employee(e.g Abigail Peterson) and open form view. >- click on **contacts** smart button. >- Delete that Record 4) Create a confirmed Payslip for the selected Employee(e.g Abigail Peterson). 5) Activate Developer mode and navigate to schedule Actions. >- Search for 'Payroll: Generate pdfs'. >- Run Manually. Error: `NotNullViolation: null value in column 'partner_id' of relation 'documents_access' violates not-null constraint` Root Cause: When the partner is deleted, the value received from `_get_document_partner` at [1] is `False`, which later on tries to create the `documents.access` record for the new document, it fails because no partner is available to assign access rights, resulting in the error. Solution: This commit prevent Error by ensuring `_check_create_documents` method doesn't allow document creation without valid partner. [1]: https://github.com/odoo/enterprise/blob/99a8d83edb42f172d0dd35c91743fa0c9653dcbb/documents_hr_payroll/models/hr_payslip.py#L20C1-L21 sentry-6814524392 Forward-Port-Of: odoo/enterprise#92865
Unchecking “Show weekends” in Analytic Reporting no longer causes months to disappear in the yearly view. The weekend filtering is now limited to detailed month views, keeping yearly reports complete and reliable.
Original PR description
To reproduce: ============= 1- Go to Analytic Reporting. 2- From the year dropdown, uncheck "Show weekends". → Some months disappear unexpectedly. Problem: ========= Weekend filtering was applied even in year range. In year view, each column is already a full month, so filtering out weekends is incorrect. Fix: ==== Adjust the condition to skip filtering when range is not "month". Weekend logic now only applies to month range grid. community-pr: https://github.com/odoo/odoo/pull/226975 opw-5078200 Forward-Port-Of: odoo/enterprise#94593
10 changes
Resolved issues and error corrections
The Helpdesk community support link now sends customers to the correct forum page instead of showing a page-not-found error. This ensures users can reach community help from a Helpdesk team when the forum option is enabled.
Original PR description
Scenario:
- create a helpdesk team
- enable community forum on it
- go to the team and click on "Ask the community"
Result: 404 error, this page does not exist
Cause: we are using helpdesk.team ID in route needing a forum.forum ID
Fix: uses /helpdesk/{team ID}/forums route instead of /forum/{team ID}
opw-5027193
Forward-Port-Of: odoo/enterprise#96026Helpdesk ticket lists now sort ticket references in a more natural order, even after ticket numbers pass 100. This helps users quickly find the oldest or newest tickets without confusing text-based ordering.
Original PR description
**Issue** With the default `helpdesk.ticket` sequence, once users reach 100 tickets, ordering tickets by `ticket_ref` in the list view is unintuitive as it is a Char field (so '11' > '100') and the results are not useful if the user wants to see the oldest/newest tickets. opw-4891916 Forward-Port-Of: odoo/enterprise#95971 Forward-Port-Of: odoo/enterprise#93058
Creating a new payroll run now opens the employee selection correctly by avoiding an empty reference that was being passed unnecessarily. This helps payroll users start new payruns more reliably without being blocked by a technical form issue.
Original PR description
When creating a new payrun, we were passing the res_id as an argument for self, but it was always falsy. This commit removes the argument such that it uses an empty recordset. task-5130462
Fixed an issue where some action buttons in the payslip list were hidden unless their action was defined in a specific controller. Payroll users can now see the correct available actions, reducing confusion and helping them complete payslip tasks without workarounds.
Original PR description
This commit fixes the display of conditional buttons in the payslips list view. The issue was that only buttons with actions defined in the list controller were displayed. This commit fixes the issue by displaying any button if the action is not specified in the list controller. Forward-Port-Of: odoo/enterprise#96050 Forward-Port-Of: odoo/enterprise#95527
This fix adjusts an accounting test so it no longer fails when account merging takes longer than expected in databases with many companies. It improves test stability without changing how users work with accounting features.
Original PR description
In test_account_merge_wizard_tour, the actual merging of the accounts can take more than 10 seconds if there are a lot of companies. It causes sometimes timeout of the step and so a fail of the tour. runbot-error-233162
This fix corrects the visual styling of the Belgian payroll holiday attest after a recent user experience update used the wrong layout classes. Employees and payroll teams will see the intended presentation, reducing confusion when viewing this document.
Original PR description
We recently fixed the UX of holiday attest but the classes used in xml were wrong. We fix this in this task. Task: 5109176 Forward-Port-Of: odoo/enterprise#95430
The Sign app guided tour was updated so it no longer fails when users drag signature fields onto documents or when an existing saved signature changes the signing flow. This helps teams and testers complete the guided workflow consistently without duplicate signature fields or stalled steps.
Original PR description
Fix `sign_tour`. How to reproduce: 1. Go to tours in Odoo 2. Look up sign_tour 3. Click testing ( If testing stops at Sign App, change search filters or archive sign all .request records so that the…
Fix `sign_tour`.
How to reproduce:
1. Go to tours in Odoo
2. Look up sign_tour
3. Click testing ( If testing stops at Sign App, change search filters or archive sign all .request records so that the following screen displays )
<img width="780" height="591" alt="image" src="https://github.com/user-attachments/assets/b164c224-0e3e-4dce-97e6-89848263e59e" />
4. tour fails!
---
First commit
The `sign_tour` was failing after the conversion of the `sign.Template` client action to OWL. The standard `drag_and_drop` tour helper can no longer be used for automatic tour testing because the drop target is inside an iframe whose content is managed by PDF.js.
This commit fixes the tour by utilizing the custom helper function, `dragAndDropSignItemAtHeight`, to programmatically simulate the drag and drop action.
---
Second commit
The step "footer.modal-footer button.btn-primary:enabled" assumes that the Signature Dialog opened from its previous step ("Sign It" navigation button).
However, the "Sign It" navigation button does not always open the dialog.
If signing user (res.users) already has "sign_signature" data, the data will be automatically filled in to the Signature input.
Otherwise, the navigation button will open the Signature Dialog.
Luckily, we can see whether user has "sign_signature" data or not by checking if the <input data-item_type='signature'/> node has "data-auto_value" attribute or not.
We now skip the step if data-auto_value is set for signature.
---
Third commit
If `sign.template_sign_tour` has sign request, it means that the template might have a sign item because the `sign_tour` tour adds the Signature sign item to the template. (If user followed the tour)
When we're copying the sign template to trigger the template tour, we should not copy the sign item. User will be guided to add the sign item during the tour.
---
Note:
ci/security needs to be overriden as it was done for https://github.com/odoo/odoo/pull/134793#issuecomment-1711440188
---
opw-4752794
Forward-Port-Of: odoo/enterprise#93601
Forward-Port-Of: odoo/enterprise#91565Bank account selection fields now show clearer visual indicators for trusted and untrusted accounts. Trusted accounts display a green shield, while untrusted accounts show a red warning icon, helping users identify payment account status more confidently.
Original PR description
This commit fixes the UI indicator of trusted/untrusted bank accounts in many2one widget. For trusted bank accounts, they are indicated with a green shield. Untrusted bank accounts are indicated with a red exclamation circle. This is a followup of the work done in this PR: https://github.com/odoo/odoo/pull/229298 task-5117800
This change updates an automated test for SEPA payment processing so it follows the current rules for bank account data handling. It helps keep the accounting payment flow reliably tested without changing day-to-day user functionality.
Original PR description
Direct update sanitized_acc_number is not allowed. Forward-Port-Of: odoo/enterprise#95477 Forward-Port-Of: odoo/enterprise#72508
This fixes an automated walkthrough used to verify the bank reconciliation screen. The correction helps avoid occasional false failures during testing, improving release confidence without changing user-facing functionality.
Original PR description
The step checks the non presence of `o_bank_rec_quick_create`. But this element does not exist, as it should be `o_bank_reconciliation_quick_create`. This causes the tour to sometimes fail as we click on unfold before the interface updates from the creation of the line. runbot-error-230727 Forward-Port-Of: odoo/enterprise#95359
32 changes
Resolved issues and error corrections
Fixed a broken helpdesk link so customers using “Ask the community” are sent to the correct forum page instead of seeing a 404 error. This helps users reach community support reliably from helpdesk teams with forums enabled.
Original PR description
Scenario:
- create a helpdesk team
- enable community forum on it
- go to the team and click on "Ask the community"
Result: 404 error, this page does not exist
Cause: we are using helpdesk.team ID in route needing a forum.forum ID
Fix: uses /helpdesk/{team ID}/forums route instead of /forum/{team ID}
opw-5027193
Forward-Port-Of: odoo/enterprise#96026The Australian payroll API tests were updated so they no longer depend on demo data, and the cleanup script was corrected. This helps prevent build failures and improves confidence that payroll-related checks run reliably in different environments.
Original PR description
Remove test dependency on demo data and fix the neutralize script. Build Error: 231619, 231643
This update adds safeguards to verify that text formatting shortcuts, such as bold or underline, behave correctly when no text is selected. It helps ensure the editor stays clean and avoids unnecessary undo history entries, improving editing reliability without changing visible features.
Original PR description
Description of the issue this PR addresses: This PR adds test cases for formatting shortcuts (e.g., Ctrl+B) on a collapsed selection. An empty inline tag is inserted temporarily and auto-cleaned if unused, so no individual history step are created. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#229429 Forward-Port-Of: odoo/odoo#229233
This update adds extra logging to an internal bus notification test that has been failing unpredictably. The added detail should help developers identify the root cause faster, with no direct change to customer-facing behavior.
Original PR description
The `test_postcommit` test ensures that the creation of several bus records result in a single postgres notify after commit. This test have been failing in a non deterministic fashion for some time. Theorical fixes have been try, but fails still persist. This commit adds some logs to this test to better understand what's happening. runbot-232798 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#228996
This removes a redundant database rule in Odoo's mail discussion channels. The change helps prevent failures when creating or migrating future databases on PostgreSQL 18, without changing how users work with mail channels.
Original PR description
The field is `required=True`, which automatically sets it `NOT NULL` (if possible). The constraint does not do anything useful. Furthermore, pg18 promoted `NOT NULL` to "real" named constraints[1],…
The field is `required=True`, which automatically sets it `NOT NULL` (if possible). The constraint does not do anything useful.
Furthermore, pg18 promoted `NOT NULL` to "real" named constraints[1], and the constraint was created following the pattern pg uses, so trying to migrate a database to pg18 (either upgrading a cluster from 17 to 18 or restoring a db on a pg18) the restoration fails with
duplicate key value violates unique constraint "pg_constraint_conrelid_contypid_conname_index"
The easiest fix is to delete the constraint in the upstream DB if possible (I didn't find a way to filter out constraints from pg_dump or pg_restore, though it should be possible to filter it out from a "plain" dump by hand).
AFAIK Odoo does not generally drop constraints so I don't think this will fix existing databases, but it at least makes future databases compatible with pg18.
[1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=a379061a22a8fdf421e1a457cc6af8503def6252
Forward-Port-Of: odoo/odoo#229539
Forward-Port-Of: odoo/odoo#229274This update narrows an automated checkout test so it focuses on verifying public access rather than trying to mimic very fast user actions. It helps avoid inconsistent test results where two orders could be created at once, improving confidence in click-and-collect stability without changing customer-facing behavior.
Original PR description
Tours are too fast for imitating the user actions that led to sometimes creating 2 orders in parallel instead of reusing the first created. The test was added for b395f984b13eb83310024b9fa94d7822211ef8c1 fix, so with this commit, we keep the test more specific to the fix and avoid inconsistent behavior. Forward-Port-Of: odoo/odoo#229630 Forward-Port-Of: odoo/odoo#218417
Fixed an issue where previewing the portal user invitation email could fail because the template used user details that were missing for portal users. The invitation preview now uses the related contact information, so staff can review portal invite emails reliably before sending them.
Original PR description
[FIX] portal: display template for portal invite Steps to reproduce: ---- - Install portal module - Grant a portal access to a contact - Go to the email template (Portal: User Invite) for the contact - Click on Preview -> Traceback Issue: --- The display was based on the user itself referencing to a partner. And there was no name for the portal users. Fix: --- Changed the view so now the different values are based on the partner.Also added the name to this function based on the partner name. opw-4444729 Forward-Port-Of: odoo/odoo#217791 Forward-Port-Of: odoo/odoo#194322
This fixes an issue in the website editor where deleting text in pricelist snippets could accidentally merge a description with its price. Website editors can now adjust pricelist content more safely without breaking the layout or confusing customers.
Original PR description
**[FIX] website: keep pricelist blocks intact** Build the unsplittable selector from the three pricelist snippet base classes so that the HTML editor no longer splits or merges their item, price, or description elements when users delete content with Backspace. Steps to reproduce: - Drag and drop a pricelist snippet (e.g., Pricelist Cafe). - Place the cursor before the first letter of one of the descriptions. - Press Backspace. - Bug: the description content is merged with the price. task-5117864 Forward-Port-Of: odoo/odoo#229227
The Google Calendar integration was updated to use Odoo's current internal context handling. This keeps the integration aligned with recent platform changes and helps avoid future compatibility issues, with no expected change to everyday user workflows.
Original PR description
after this PR: https://github.com/odoo/odoo/pull/193636 self._context usage has been deprecated in favor of self.env.context. This commit updates google_calendar accordingly. <img width="1916" height="447" alt="image" src="https://github.com/user-attachments/assets/622de21e-7c4c-4efc-8cff-045704934f04" /> --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The payslip list now displays relevant action buttons even when those actions are not preconfigured in the list controller. This helps payroll users access the expected options directly from the list view and avoids missing workflow actions.
Original PR description
This commit fixes the display of conditional buttons in the payslips list view. The issue was that only buttons with actions defined in the list controller were displayed. This commit fixes the issue by displaying any button if the action is not specified in the list controller. Forward-Port-Of: odoo/enterprise#95527
Fixed an issue that could cause website-generated product imports to fail when adding multiple images to a product variant. This helps teams import product catalogs more reliably without interruptions from image handling errors.
Original PR description
Fixed a typo that leads to a crash when importing multiple images for a product variant Forward-Port-Of: odoo/enterprise#96134
This fixes an issue that prevented users from deleting an employee version from the versions list. HR teams can now manage employee history records without seeing an incorrect warning that the record no longer exists.
Original PR description
Issue/Current Behavior: It is not possible to delete a version of an employee. Steps to Reproduce: 1. Create an employee. 2. Create a new version of the employee. 3. Click on the smart button of versions and delete a record from the list view. 4. It gives warning that the record doesn't exist or might be deleted. Solution: Fixed the issue by checking that the context version exists or else the empty recordset. task - 5002995 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224585
Invoices using the UAE localization now print with properly aligned columns even when invoice lines have no taxes. This prevents confusing or unprofessional invoice layouts for businesses issuing tax-free invoices.
Original PR description
**Steps to reproduce:** 1- Install UAE localization (l10n_ae). 2- Create an invoice without adding any taxes in the invoice lines. 3- Print the invoice → column alignment is broken. **Issue:** In UAE…
**Steps to reproduce:** 1- Install UAE localization (l10n_ae). 2- Create an invoice without adding any taxes in the invoice lines. 3- Print the invoice → column alignment is broken. **Issue:** In UAE localization, the invoice report shows misaligned columns when the tax field is empty. **Cause:** Since Odoo 18.4, the core report logic hides the tax column when no taxes are applied. However, l10n_ae does not handle this scenario properly while replacing columns, which results in broken alignment. **Solution:** Added a condition in l10n_ae to correctly handle the case when the tax field is empty, ensuring column alignment is maintained in the invoice report. **Before Fix:** <img width="777" height="326" alt="image" src="https://github.com/user-attachments/assets/1416c03a-9da5-45fe-8ade-2a9037f70812" /> **After Fix:** <img width="767" height="341" alt="image" src="https://github.com/user-attachments/assets/9d418945-45e2-409e-b00e-b4f8272ea013" /> opw-4965240 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224034
This update fixes a failing automated test in the Mexican electronic stock localization by creating the needed vehicle record with the correct permissions. It helps keep validation checks reliable after vehicles moved under fleet management, with no expected change for end users.
Original PR description
Since the latest changes to the model, vehicles are now managed from the fleet app. However, there is an error in the tests because the default test user does not have the necessary permissions to create fleet.vehicle model records, as the module flow does not include adding logic to fleet or new permissions. To fix this, the fleet vehicle record is created with superuser permissions. See: https://runbot.odoo.com/odoo/error/232645 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Selecting table cells in the HTML editor now correctly disables the link button, preventing users from trying to add links where that action is not supported. The change also improves single-cell selection behavior so a cell is selected only when its full content is selected, making table editing more predictable.
Original PR description
**Current behaviour before PR:** Steps to reproduce: - Create a 3 x 3 table. - Select first column. The link button in toolbar is enabled and it should not. This happens because after merging this commit [1], `isLinkAllowedOnSelection` method returns true if selected cells are not adjacent. **Desired behaviour after PR is merged:** Now, selecting cells open toolbar with disabled link button. [1]: https://github.com/odoo/odoo/commit/c0d07fdcf4cc139177524eb4ea22ab341b3da7fb task-4965270 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#221033
This fix updates Chilean bank reference data to use a stable country identifier instead of relying on the country name. This prevents module installation or upgrade failures when country names have been customized or corrupted in a database.
Original PR description
`res.country` records are `noupdate` by default, which means that changes such as the following are not reverted: ```SQL pied@(none):pied_3131231> SELECT c.name->>'en_US' FROM res_country c JOIN…
`res.country` records are `noupdate` by default, which means that changes such as the following are not reverted:
```SQL
pied@(none):pied_3131231> SELECT c.name->>'en_US' FROM res_country c JOIN ir_model_data d ON d.res_id = c.id AND d.model = 'res.country' AND d.module = 'base' AND d.name IN ('cl', 'co')
+----------+
| ?column? |
|----------|
| COLOMBIA |
| Colombia |
+----------+
```
Note: in this specific, the change is clearly an error introduced in the data. Still, the error it produces (which follows) can be avoided by referring to the xmlid, instead of the record name.
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/saas-18.4/odoo/service/server.py", line 1410, in preload_registries
registry = Registry.new(dbname, update_module=update_module, install_modules=config['init'], upgrade_modules=config['update'])
File "<decorator-gen-6>", line 2, in new
File "/home/odoo/src/odoo/saas-18.4/odoo/tools/func.py", line 89, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/saas-18.4/odoo/orm/registry.py", line 175, in new
load_modules(
File "/home/odoo/src/odoo/saas-18.4/odoo/modules/loading.py", line 455, in load_modules
load_module_graph(
File "/home/odoo/src/odoo/saas-18.4/odoo/modules/loading.py", line 226, in load_module_graph
load_data(env, idref, 'update', kind='data', package=package)
File "/home/odoo/src/odoo/saas-18.4/odoo/modules/loading.py", line 79, in load_data
tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
File "/home/odoo/src/odoo/saas-18.4/odoo/tools/convert.py", line 624, in convert_file
convert_csv_import(env, module, pathname, fp.read(), idref, mode, noupdate)
File "/home/odoo/src/odoo/saas-18.4/odoo/tools/convert.py", line 680, in convert_csv_import
raise Exception(env._(
Exception: Module loading l10n_cl failed: file l10n_cl/data/res.bank.csv could not be processed:
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
No matching record found for name 'Chile' in field 'Country'
```
upg-3131231
Forward-Port-Of: odoo/odoo#229435
Forward-Port-Of: odoo/odoo#229218The user form now keeps the login editable after a user is created while avoiding duplicate-looking email and login fields when they match. In HR, the same behavior applies using the employee work email, making account updates clearer without adding unnecessary clutter.
Original PR description
We want to allow users to edit the login even after the user is created. However as the email is usually the same as the login we don't want to be too noisy by having duplicate values. If the email and login field are the same: only show the login field If the user goes to the user form and modifies the "email" (actually login) both fields will appear and they will be able to modify each independently. Same logic is applied to hr with user.work_email replacing user.email task-5130854
The accounting interface now shows trusted bank accounts with a green shield and untrusted bank accounts with a red warning icon. This makes it easier for users to quickly recognize account trust status and avoid mistakes during payment-related work.
Original PR description
This commit fixes the UI indicator of trusted/untrusted bank accounts. For trusted bank accounts, they are indicated with a green shield. Untrusted bank accounts are indicated with a red exclamation circle. task-5117800 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Messages that use only @everyone in Discuss channels now send successfully. This prevents failed team-wide notifications when no individual users are tagged, making channel announcements more reliable.
Original PR description
**Before this commit:** Since [1] if a user wrote a message with only `@everyone` and did not mention any individual user, the message failed to send. This happened because the system tried to combine the list of mentioned users with the list of channel members, but the mentioned users list was None and caused an error. **After this commit:** `@everyone` can be used on its own without also tagging specific users. When no other users are mentioned, the system simply treats it as an empty list and continues normally, allowing the message to be sent to everyone in the channel. [1]: https://github.com/odoo/odoo/pull/219637 Task-5136984 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an automated test for QFPay refunds that could fail depending on the time of day. It helps keep validation builds stable without changing the customer-facing payment experience.
Original PR description
Refund cannot be processed after 11PM and are leading to errors whenever the test happens to run between 11PM and midnight. runbot build error: 232599 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Belgian payroll employee form now shows the Patrena code field again. Related payroll provider codes for UCM and SD Worx are also arranged more clearly, helping payroll teams find and maintain employee provider information more easily.
Original PR description
Restored the Patrena code field and arranges the other related codes (UCM & SD Worx) so that they are displayed two per row. task-5052003 Forward-Port-Of: odoo/enterprise#93635
Turkish e-invoice XML notes now exclude extra hyperlink reference footnotes from invoice terms and conditions. This keeps the submitted e-invoice content cleaner and avoids duplicate or confusing link text in official XML documents.
Original PR description
Currently, when we add some hyperlinks in the Terms and Conditions of the invoice, it comes along with the hyperlink reference in the 'cbc:Note' tag in the XML. Example: ```xml <cbc:Note> Terms: Payment: https://www.odoo.com [1] Refund: https://www.google.com [2] [1] https://www.odoo.com [2] https://www.google.com </cbc:Note> ``` This PR removes that hyperlink references in the e-invoice XML. task-5027935 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a startup or module-related issue on ArchLinux systems where Odoo expected an optional operating system field that is not present. It makes Odoo handle ArchLinux correctly, improving reliability for deployments on that platform.
Original PR description
The `platform.freedesktop_os_release()` function returns the content of the `/etc/os-release` file as a `dict[str, str]`. The entry `ID` is the name of the OS (`linuxmint` on Linux Mint) and `ID_LIKE` is the name of the OS `ID` is derived from (`ubuntu debian` on Mint). In ArchLinux the `ID` is `arch` and `ID_LIKE` entry is missing. Reported-By: Muhammad Al-Habib Ouadhour <houadhour@yandex.com> 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#229207
The payment wizard now shows clearer and more accurate messages when early payment discounts are involved. Users selecting the full amount will be guided to the correct discount option instead of being incorrectly pointed to installments, reducing confusion during payment entry.
Original PR description
This commit fixes the Pay wizard message by: - Removing an unnecessary extra semicolon in the displayed message. - Correcting the suggestion shown when Early Payment Discount (EPD) is applied and the user selects the full amount. Previously, it incorrectly suggested switching to installments (a different payment method). It now correctly suggests switching to the early payment discount option. task-5090074
Rental product prices in the online store now follow the website currency's configured decimal precision. This prevents prices from incorrectly showing extra decimals, improving consistency and customer clarity.
Original PR description
Versions -------- - 17.0 Steps ----- 1. Set currency precision to 0 decimals; 2. check prices in eCommerce as public user. Issue ----- Prices are displayed with 2 decimals Cause ----- The `_priceToStr` method used, always uses a `precision` of 2, except in editor mode when it will retrieve a different value from a hidden `.decimal_precision` element. Solution -------- Add the website's currency precision to `combination_info` via the controller, and use this value in `_priceToStr`. opw-4996878 Community PR: https://github.com/odoo/odoo/pull/224429 Forward-Port-Of: odoo/enterprise#95968 Forward-Port-Of: odoo/enterprise#95634
This fixes an issue where tax return report period options could be matched against the wrong report identifier when reports use sections. Businesses using sectioned accounting reports should see more reliable period selection and fewer incorrect return views.
Original PR description
The _init_options_return_periodicity would compare the report_id with self.id, which would lead to bugs in the case of reports with sections since in those cases it's the section id that's taken into account. Added that check. Also backported https://github.com/odoo/enterprise/pull/93187 's fix. Forward-Port-Of: odoo/enterprise#96115
Payment providers copied for newly created companies will no longer keep a website link that belongs to a different company. This prevents company consistency errors during company creation while preserving the website link when it is valid for the same company or a branch.
Original PR description
Versions -------- - saas-18.4+ Steps ----- 1. Specify a website for a payment provider; 2. create a new (non-branch) company. Issue ----- > Uh-oh! You’ve got some company inconsistencies here Cause ----- As of commit 0d3228e10d04a, payment providers get automatically duplicated when creating a new company. This leads to company inconsistencies when the provider has a website specified, as the website's company doesn't match copied provider's company. Solution -------- Disable automatic copying of the `website_id` field, and instead, handle it manually in the `copy` override, assigning the `website_id` field iff the new provider belongs to the same company or a branch company. opw-5119731 Forward-Port-Of: odoo/odoo#229676
This fix prevents the online shop product page from crashing when a website editor removes the quantity selector. Customers and editors can continue using product pages normally, even when that page element is not present.
Original PR description
steps to reproduce: ------------------- 1. Install website_sale_stock 2. Go to Website > Shop > Product (with inventory tracking enabled) 3. Click on Edit and remove the "Quantity" snippet 4. Save…
steps to reproduce: ------------------- 1. Install website_sale_stock 2. Go to Website > Shop > Product (with inventory tracking enabled) 3. Click on Edit and remove the "Quantity" snippet 4. Save the changes issue: ------ ``` TypeError: Cannot read properties of null (reading 'value') ``` cause: ------ The code: https://github.com/odoo/odoo/blob/2bd0b503e0b30a7a5e19736f7bdf89700ef1d3c6/addons/website_sale_stock/static/src/js/variant_mixin.js#L35-L36 unconditionally accessed `addQtyInput.value` This raises an error when the "Quantity" snippet has been removed, since `addQtyInput` is null. Reference PR: https://github.com/odoo/odoo/pull/223917 **NOTE**: During the conversion of website_sale public widgets to interactions, the jQuery was replaced with an HTML element. For e.g, ```python3 $addQtyInput ==> addQtyInput ``` Unlike jQuery objects, native elements can be null, but the code still assumes its presence in several places, https://github.com/odoo/odoo/blob/bdc888e78283f25067eb8cf5b79d4c30ad4b3469/addons/website_sale_stock/static/src/js/variant_mixin.js#L36 https://github.com/odoo/odoo/blob/bdc888e78283f25067eb8cf5b79d4c30ad4b3469/addons/website_sale_stock/static/src/js/variant_mixin.js#L43 https://github.com/odoo/odoo/blob/bdc888e78283f25067eb8cf5b79d4c30ad4b3469/addons/website_sale_stock/static/src/js/variant_mixin.js#L58 This leads to errors when the "Quantity" snippet is removed. solution: --------- Check if `addQtyInput` exists before accessing its value. Co-Authored by loti@odoo.com opw-5095486 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures the VAT number test suite can correctly load its external validation dependency. It reduces the risk of false test failures, helping maintain confidence in VAT validation behavior without changing day-to-day user workflows.
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
This fix restores the tooltip text that appears when users hover over custom text fields in sale order lines. It ensures information entered in these fields is easier to review without opening or editing the line, improving usability for sales teams using Studio customizations.
Original PR description
## Versions 18.0+ ## Issue No tooltip can be displayed on Sale Order Lines. ## Steps to reproduce *Install Studio* - Open any SO; - Open Studio: - Click "Edit List view" on the Order Lines table; - Add a "Text" field in the columns; - Close Studio. - Add a product line if none: - Write something in the new column added with Studio; - Hover that cell and see no tooltip appear ## Cause https://github.com/odoo/odoo/blob/4daf4824a70ef679f65d5cbb15d71bc55c1e760e/addons/web/static/src/views/list/list_renderer.xml#L250 The template calls `getCellTitle` which returns a formatted text but has been overridden. These methods call the original `getCellTitle` method but don't return the formatted value. opw-4921113 Forward-Port-Of: odoo/odoo#229634 Forward-Port-Of: odoo/odoo#225550
This fixes an internal automated test for Odoo's bus messaging module so it only considers notifications from the database being tested. The change helps prevent misleading test failures and supports more reliable quality checks without changing user-facing behavior.
Original PR description
In [1], logs were added to the `test_postcommit` test in order to better understand why it sometimes fails. However, this commit changed the test behavior: we only care about notify coming from the DB executing the test, but the `channel` variable is filled regardless of the DB the notification comes from. [1]: https://github.com/odoo/odoo/pull/229106 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#229844
This fixes an automated bank reconciliation walkthrough so it waits for the right screen element before continuing. It helps prevent occasional false test failures, improving confidence in releases without changing everyday user behavior.
Original PR description
The step checks the non presence of `o_bank_rec_quick_create`. But this element does not exist, as it should be `o_bank_reconciliation_quick_create`. This causes the tour to sometimes fail as we click on unfold before the interface updates from the creation of the line. runbot-error-230727 Forward-Port-Of: odoo/enterprise#95359
10 changes
Resolved issues and error corrections
The Ask the Community button now opens the correct forum page for helpdesk teams with community forums enabled. This prevents customers or agents from hitting a 404 error when trying to access community support.
Original PR description
Scenario:
- create a helpdesk team
- enable community forum on it
- go to the team and click on "Ask the community"
Result: 404 error, this page does not exist
Cause: we are using helpdesk.team ID in route needing a forum.forum ID
Fix: uses /helpdesk/{team ID}/forums route instead of /forum/{team ID}
opw-5027193
Forward-Port-Of: odoo/enterprise#96026Field Service project settings now show the correct label for the timesheet product when a customer is selected. This avoids confusion by preventing the sales order line label from appearing in the wrong place.
Original PR description
Steps to reproduce: - Install the `industry_fsm_sale` module. - Open the FSM app. - Go to Projects. - Open a project’s settings. - Select a customer. Issue: The label for the timesheet product is not displayed. Instead, the label for the sale order line appears on FSM projects. Cause: In the PR, https://github.com/odoo/odoo/pull/128967 changed the project settings form structure by wrapping `sale_line_id` in a `div` and separating its label, breaking the xpath for `timesheet_product_id`. Fix: - Update the XPath for `timesheet_product_id` to target the correct container. - Hide the `sale_line_id` label on FSM projects. task-4581748
The payroll screen now hides the verified source tax statement button when the institution response does not include a correction. This prevents users from opening a report action that would not produce a relevant document, reducing confusion in Swiss payroll processing.
Original PR description
This button will give a report only in the case where the institution response has a correction, so it should be hidden. Forward-Port-Of: odoo/enterprise#96128
The website editor now shows the option to enable or disable the discount subtotal on checkout pages again. This restores control for website managers who need to adjust how discounts are displayed during checkout.
Original PR description
Since 0750eb6315fe9c2d1f1de36b9b756b5097ed11e0, enabling or disabling the discount subtotal in the checkout pages is impossible. Now, the settings will be shown again in the website editor. opw-3995547
Event descriptions now handle embedded links correctly so Gmail does not break the event URL. This helps recipients open event pages reliably from their email invitations or notifications.
Original PR description
When website_event is installed an anchor tag is added inside the event description which is guaranteed to break the url in the gmail client. We now quote the description appropriately so that there's no confusion. task-5092759
This fix changes how encoded report data is passed during IoT-related printing so existing customizations continue to work. It prevents errors for businesses using custom modules while keeping the recent printing behavior intact.
Original PR description
Following commit https://github.com/odoo/enterprise/commit/ecea27f45ab58ae6f348753d94fdf89f902a43b9, the argument `data_base64` was added to the `render_and_send` function. However, adding new arguments in stable versions is not allowed, as it may break custom modules that override this function and do not expect the additional argument. This commit ensures that `data_base64` is passed through the context instead, preventing errors while keeping compatibility with existing overrides. opw-data_base64
Social Marketing previews now correctly recognize links that include comma-separated parameters, so URLs are no longer cut off at the first comma. This helps users preview and publish posts with accurate links, avoiding broken or incomplete destinations.
Original PR description
**Steps to reproduce:** - Go to `Social Marketing` app. - Click on `New Post`. - Select Facebook for preview (should not matter). - Write a message with an URL which have comma-separated parameters. (e.g 'TEST URL https://example.be:8080/path/res-123/ext/?param1=v1,v2,v3') - URL is cut on the first comma in the preview. **Issue:** URL regex did not match URLs containing comma-separated query parameters, causing them to be truncated. **Fix:** Updated the regex to include commas. opw-5042131
This fix prevents users from seeing a technical error when a shared shipping label print request reaches someone who cannot connect to the IoT printer. Labels can still print for users on the correct network, while other users are no longer disrupted by misleading failure messages.
Original PR description
Printing shipping labels is performed from the backend, once the shipping info are received in the chatter. The printing command is sent to the frontend via the user bus, then through longpolling to the iot box.
As multiple users can receive the broadcasted message at the same time, but might not be able to reach the printer, we need to avoid displaying a traceback on failure.
Note that as it is broadcasted, a user could receive the traceback even if label was already printed by the user that was on the same network as the IoT Box.
Also note that we don't even display a notification as it would be displayed to every user connected that couldn't reach the IoT Box.
Task: 4792491
Forward-Port-Of: odoo/enterprise#95794The customer portal now shows the invoice delivery preference message only when customers can actually choose an invoice delivery method. This prevents confusing guidance from appearing when the related selection field is hidden.
Original PR description
Currently, there is no validation in place to determine when the labe related to invoice_sending_methods should be added to the portal_my_details_fields template in the inheritance made in [1].
This results in the following:
For invoice_sending_methods, the label/message: 'You can choose how yo want us to send your invoices, and with which electronic format.' is always displayed, even if the <select> to define the method is not visible.
Now, a validation has been added to display this label only when necessary, in order to avoid user confusion.
[1]: https://github.com/odoo/odoo/commit/de567b6
Before:

After:
Users who close the email validation banner will no longer see it return unexpectedly. This prevents confusion after an email has already been validated or the notification has been dismissed.
Original PR description
### Issue 1: The validated email success banner wasn’t triggering the RPC call because Bootstrap’s `data-bs-dismiss="alert"` removed the element from the DOM before the handler could run. ### Issue 2 Closing the banner previously triggered `/profile/validate_email/close` RPC, which reset `validation_email_done` to false. This mistakenly caused the “email sent” banner to reappear, confusing users. ### Solution - Overwrite Bootstrap’s `close.bs.alert` event to trigger the RPC when the success banner is dismissed. - Set `validation_email_sent = False` so the banner stays hidden after being closed. Task-5049533 Forward-Port-Of: odoo/odoo#225872
6 changes
Resolved issues and error corrections
Very small negative amounts that round to zero now display as 0.00 instead of -0.00. This avoids confusing signs in Luxembourg reports and keeps rounded monetary values clearer for users.
Original PR description
float_repr(-0.00000001, 2)
formatFloat(-0.00000001, { digits: [16, 2] })
Before: "-0.00"
After: "0.00"
opw-4685953
closes odoo/enterprise#90992
Related: odoo/odoo#219913This update fixes an internal test issue that occurred only when an optional file-detection library was installed. It helps keep automated checks stable, reducing noise for developers without changing customer-facing behavior.
Original PR description
This tests are failing when python-magic is installed. Leftover of #223609 Runbot error 231171
Users who close the email validation banner will no longer see it return unexpectedly. This reduces confusion after email validation and makes the profile experience behave as expected.
Original PR description
### Issue 1: The validated email success banner wasn’t triggering the RPC call because Bootstrap’s `data-bs-dismiss="alert"` removed the element from the DOM before the handler could run. ### Issue 2 Closing the banner previously triggered `/profile/validate_email/close` RPC, which reset `validation_email_done` to false. This mistakenly caused the “email sent” banner to reappear, confusing users. ### Solution - Overwrite Bootstrap’s `close.bs.alert` event to trigger the RPC when the success banner is dismissed. - Set `validation_email_sent = False` so the banner stays hidden after being closed. Task-5049533
Mandatory matrix questions in surveys now work correctly even when their description includes a table. This prevents errors during survey completion and helps respondents submit answers without interruption.
Original PR description
A conflict occurs if a matrix question is set to "Mandatory answer" (questionRequired = True) and a table is also added to its description. The issue is that when the system evaluates a required…
A conflict occurs if a matrix question is set to "Mandatory answer" (questionRequired = True) and a table is also added to its description. The issue is that when the system evaluates a required matrix, it gets the subQuestionsIds by looking for the first table within the question's wrapper. If a table exists in the description, the system incorrectly tries to retrieve the IDs from that table. This action throws a traceback because the descriptive table does not contain any sub-question data. This commit fixes the issue by being more specific when looking for the table containing the subQuestionsIds. It adds a specific class to this table and uses it in the selector. An attribute selector, like 'table[data-sub-questions]', could also have been used as an alternative. opw-4931881 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
Exporting a Belgian 325 form PDF no longer crashes when there are no related 281.50 forms to include. Users now see a clear message explaining that they need to record a transaction with a 281.50 tag before generating the PDF, while normal downloads still work when data exists.
Original PR description
### Problem When clicking **"Export PDF"** on a 325 form that has **no generated 281.50 forms**, Odoo raised a **server error**: This happened because the method assumed that at least one attachment…
### Problem When clicking **"Export PDF"** on a 325 form that has **no generated 281.50 forms**, Odoo raised a **server error**: This happened because the method assumed that at least one attachment would always be generated, even if no eligible transactions were present. --- ### Steps to Reproduce 1. Go to **Accounting → Reporting → 325 Form**. 2. Create a 325 form for a year without any transactions on accounts tagged with **281.50**. 3. Do not generate any 281.50 forms (`form_281_50_ids` is empty). 4. Click **Export PDF**. **Result before fix:** - Crash with `IndexError: list index out of range`. --- ### Solution - Added a safeguard check before accessing attachments. - If no attachments exist, raise a **UserError** instead of crashing. **New behavior:** > *“No 281.50 lines found to generate a PDF. Please record a transaction with a 281.50 tag first.”* This gives users a instruction on how to resolve the issue. --- ### Result After Fix - **User error message** replaces traceback. - **Normal behavior preserved** when attachments exist: - One file → direct download. - Multiple files → zipped download. --- task-5090120
The barcode scanning dialog now handles users leaving the camera screen before the preview finishes loading. This prevents an error message or crash when pressing Back or Escape quickly, making the scanning flow more reliable.
Original PR description
Steps to reproduce: 1. Install `barcode` 2. Barcode > 'click to scan' 3. Before the camera preview loads, click the back button of the dialog Issue: A traceback occurs: `OwlError: The following error occurred in onMounted: 'Cannot set properties of null (setting 'srcObject')' ` Cause: Clicking the back button triggers `onWillUnmount`, which clears the stream and sets `this.videoPreviewRef.el` to null. However, some asynchronous functions in `onMounted` are still pending and try to access the video element, leading to a crash. Solution: Add a safe check based on component status before accessing `this.videoPreviewRef.el` opw-5055566