Daily updates from Odoo
Wednesday, October 22, 2025
2 changes
Enhancements to existing features
This change improves how salesperson team access is checked when opening the Phone app, avoiding a slow database lookup on large installations. For businesses with high call and user volumes, the default Phone app list can load dramatically faster, reducing wait times for sales teams.
Original PR description
Description ----------- Following odoo/enterprise@88b8de95e1a28a8037a386fc8fb6a044a98217e7 and odoo/enterprise@777ebe3918aacdfe3f09078f542e2a784f72a67f, opening the Phone app for a salesperson is…
Description ----------- Following odoo/enterprise@88b8de95e1a28a8037a386fc8fb6a044a98217e7 and odoo/enterprise@777ebe3918aacdfe3f09078f542e2a784f72a67f, opening the Phone app for a salesperson is slow on databases with an already large volume of `voip.call` and `res.users`. This is due to the disjonction (OR-ing) between `ir.rule` `voip_call_rule_user` and `voip_call_team_access_rule`. It leads to Postgres doing a naive O(n^2) join between all `voip.call` and the `res.users` to only then do some post-filtering. Technically the domain introduced by `voip_call_rule_user` becomes redundant once `voip_call_team_access_rule` is applied for `read`, as reading your own sales team calls includes also your own calls. Sadly there is currently no way to drop the redundant condition only for salesperson, without relaxing the rule for all `Role / User`. This commit addresses the issue by inlining the ids when resolving `_search_crm_team_ids` directly, to avoid the elaborate subquery generated when resolving the One2many `crm_team_member_ids`. We fall back on the previous behavior in case we might be injecting too many ids, which might introduce a performance regression. We assume that on average this won't be the case. This leads to trivial queries that properly use relevant indexes. Benchmark --------- On a database with over 10M `voip.call` and `res.users`, for a salesperson to open the Phone's app default list view with no default filter (the default setup), took: | Before | After | Speed-up | |--------|-------|----------| | 14sec | 150ms | 93x | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fixes stock valuation when products are bought or moved in a different unit of measure than their base unit. It prevents understated inventory values and incorrect accounting entries, such as valuing 1 kg as if it were 1 gram.
Original PR description
Steps to reproduce the bug:
- Create a storable product “P1”:
- UoM: Gram
- Add a vendor with UoM in Kg
- Standard price: $10 per Gram
- Create a delivery order:
- 1 Kg of P1
- Validate the delivery
Problem:
The stock move value is computed as $10 instead of $10,000, which leads to incorrect journal items and stock valuation.
Solution:
Use qty in product's UoM instead of `quantity`
when computing the move value.
opw-5105260