Daily updates from Odoo
Wednesday, April 9, 2025
12 changes · 18.0
Resolved issues and error corrections
The website shop autocomplete component is now set to install automatically when its related apps are present. This helps ensure the expected search assistance is available without extra manual setup.
Original PR description
task-4715664 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 update fixes and streamlines internal automated testing tools used across several Odoo apps. It helps tests better match real user behavior and server responses, reducing false results and improving confidence in future releases.
Original PR description
New PR: https://github.com/odoo/odoo/pull/205405
This update prevents a discount or loyalty coupon generated for one customer from being used by another customer during checkout. It helps ensure promotions are applied only to their intended recipients and avoids unintended discounts.
Original PR description
Description of the issue/feature this PR addresses: https://github.com/odoo/odoo/issues/205431 - Go to Sale>Orders>Discount&Loyalty - Create a new coupon program - Generate coupon for selected user: User A - Login into user B, go to Website>Checkout and apply coupon B Current behavior before PR: Can apply coupon of user A for sale_order of user B Desired behavior after PR is merged: Cannot apply coupon of user A for sale_order of user B --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
When a discussion thread is created from a message, the message author is now added as a participant automatically. This helps ensure the right person stays included in follow-up conversations without manual action.
Original PR description
**Current behavior before PR:** When a thread is created from a message, the message author is not automatically added as a member of the thread. **Desired behavior after PR is merged:** The message author is implicitly added as a member when a thread is created from message. **Task**-4656632 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents outdated call connection attempts from continuing after a participant connection has already been removed. It helps avoid duplicate or invalid audio/video streams, making Discuss calls more stable when switching connection methods.
Original PR description
Before this commit, and since the addition of the SFU fallback feature, it was possible that a peer was removed while being created or connected, this could lead to a race condition where we no longer need the peer but some negotiations are still being made. This commit fixes this issue by stopping the negotiation if the peer no longer exist when the promises are resolved. Another race condition could lead to receiving a track from the failed peer-to-peer connection (as tracks are generated when transceiver are created, before we know if the connection is stable), while we already have a track from the SFU. This commit fixes this issue by: 1) Awaiting that the p2p connection is ready before emitting the tracks, which ensures that the API only provides valid tracks (when usable). 2) Adding a concept of sequence to prevent race conditions between connections and tracks.
This fix prevents product images from appearing cropped or overly zoomed when opening the Point of Sale register. It helps sales staff identify products more easily and keeps the checkout interface visually clear.
Original PR description
Description of the issue/feature this PR addresses:
> - When we open the POS register, products get cropped and zoomed in version 18.0
Link to OPW :[4571051](https://www.odoo.com/odoo/project/70/tasks/4571051)
**Steps:**
> - Install module: point_of_sale
> - Open Point of sale -> Continue selling in dashboard -> and show the images
Current behavior before PR:
Before fix:

After fix:

Desired behavior after PR is merged:
- All product images are appropriately shown after my fix
- The issue comes in version 18.0, saas~18.1 and saas~18.2
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix changes a point of sale upgrade step so it processes records in smaller batches instead of loading millions at once. This helps large businesses complete upgrades reliably and avoids memory-related crashes during database migration.
Original PR description
Enhance query efficiency for large accrued data by implementing batch processing Previously, fetchall() loaded all IDs at once, causing memory errors. ```sql select count(*) from pos_order; count…
Enhance query efficiency for large accrued data by implementing batch processing
Previously, fetchall() loaded all IDs at once, causing memory errors.
```sql
select count(*) from pos_order;
count
----------
16736714
(1 row)
select count(*) from pos_order_line;
count
----------
24988345
(1 row)
select count(*) from pos_payment;
count
----------
16430502
(1 row)
```
- Traceback
```python
Traceback (most recent call last):
File "/home/odoo/src/odoo/18.0/odoo/service/server.py", line 1321, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-13>", line 2, in new
File "/home/odoo/src/odoo/18.0/odoo/tools/func.py", line 97, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/18.0/odoo/modules/registry.py", line 127, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 484, in load_modules
processed_modules += load_marked_modules(env, graph,
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 372, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 240, in load_module_graph
migrations.migrate_module(package, 'post')
File "/home/odoo/src/odoo/18.0/odoo/modules/migration.py", line 254, in migrate_module
mod.migrate(self.cr, installed_version)
File "/home/odoo/src/odoo/18.0/addons/point_of_sale/upgrades/1.0.2/post-deduplicate-uuids.py", line 38, in migrate
deduplicate_uuids("pos_order_line")
File "/home/odoo/src/odoo/18.0/addons/point_of_sale/upgrades/1.0.2/post-deduplicate-uuids.py", line 30, in deduplicate_uuids
all_ids = [r[0] for r in cr.fetchall()]
MemoryError
```
opw - 4544050
upg - 2459515
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-prFixed an issue that could cause a server error when users added a task line on a contact form and selected a project. This improves reliability for customized contact forms using task-related fields.
Original PR description
Issue: Server error raised when selecting a project in a new task field added to a contact form Steps to reproduce: - Go to Contacts > select a contact - Click on toggle studio - Add the 'task' field in the contact form - Go back to the contact - In the task field, add a line - Select a project an error is raised This fix is to properly handles NewId objects in the domain construction. opw-4575975
This fix separates test setup settings for web components and their surrounding containers. It helps prevent incorrect test conditions, making future web interface changes safer and more reliable without affecting end users directly.
Original PR description
Before this commit, in the `mountWithCleanup` test helper, the same `env` object was passed to both the given component and the main component container. This is wrong as in some cases, the env given to the given component should include sub-env specific information, like the `config` key given to the `View` component (that shouldn't be given to the container). This commit ensures that these `env` objects can be configured separately. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an automated check for the website rental flow so it selects date range fields more reliably. It helps ensure the rental period selection experience is tested correctly and avoids false failures caused by keyboard focus moving to the wrong field.
Original PR description
In this commit, we prefer to use click on element instead of press Tab because tab will directly focus the other range period input.
This update improves internal automated tests by enforcing consistent data types and simplifying test setup definitions. It helps reduce false test failures and supports smoother ongoing maintenance across several Odoo apps, without changing day-to-day user features.
Original PR description
New PR: https://github.com/odoo/enterprise/pull/83169
A Documents app test was adjusted so it no longer fails when French accounting data adds an extra company to the test user. This improves reliability of automated checks without changing business features or user workflows.
Original PR description
test_upload_internal_multi_company_defaults was added in commit 9f66204e0cd0b2f19456f3bb0131d23e6d137b0b (PR #80060) but for databases with l10n_fr_account installed, the test fails due to the user…
test_upload_internal_multi_company_defaults was added in commit 9f66204e0cd0b2f19456f3bb0131d23e6d137b0b (PR #80060) but for databases with l10n_fr_account installed, the test fails due to the user having another company : base.demo_company_fr
This creates the following error message when running the tests:
```Py
FAIL: TestDocumentsControllers.test_upload_internal_multi_company_defaults
Traceback (most recent call last):
File "/home/odoo/src/enterprise/documents/tests/test_controllers.py", line 953, in test_upload_internal_multi_company_defaults
self.assertEqual(self.user_admin.company_ids, main_company | comp)
AssertionError: res.company(28, 1, 110) != res.company(1, 110)
```
with the following command :
```bash
python3 odoo-bin --addons-path="addons/,../enterprise/" -d test_4507424 -i documents,accountant,l10n_fr_account --test-tags .test_upload_internal_multi_company_defaults
```
(make sure to use the correct python3, odoo-bin, and addons-path)
This commit fixes the test by removing the constraint that self.user_admin can only have 2 companies
After this commit, the test is successful with the same configuration and execution command
opw-4700255
opw-4507424