Friday, February 14, 2025
12 changes · master
Enhancements to existing features
The project sharing wizard now avoids showing a misleading share confirmation when no collaborators are selected. Instead, users see a more appropriate closing or saving action, making the workflow clearer and reducing confusion.
Original PR description
Currently, when there are no collaborators in the project sharing wizard and you click on the "Share Project" button, a toast will get displayed indicating that the project was shared with the collaborators, which is misleading. This PR adds a "Close" button that is displayed instead of the "Share Project" and "Discard" button when there are no collaborators. task-4004946
This update makes several frequently used core Odoo operations slightly faster, especially when working with single records or repeated cache lookups. The changes are internal optimizations intended to improve responsiveness without changing business workflows or user-facing behavior.
Original PR description
Small optimizations of core functions. ## iteration We can prevent allocation when iterating over a single element (common case) and resolve variables only once. ```python def test(n): model =…
Small optimizations of core functions.
## iteration
We can prevent allocation when iterating over a single element (common case) and resolve variables only once.
```python
def test(n):
model = self.browse(range(n))
%timeit list(model)
# BEFORE and AFTER times
In [5]: test(0)
148 ns ± 0.266 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)
143 ns ± 1.78 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)
In [4]: test(1)
282 ns ± 2.93 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
161 ns ± 2.96 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)
In [6]: test(5)
761 ns ± 3.29 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
714 ns ± 1.96 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
In [7]: test(50)
6.19 μs ± 17.7 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
5.66 μs ± 22.7 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
In [9]: test(5500)
719 μs ± 1.59 μs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
664 μs ± 6.36 μs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
```
## browse
Don't allocate a list if not needed.
## with_context
Simplify the signature of the function and make the first positional parameter explicit.
```python
%timeit self.with_context()
%timeit self.with_context(a='test')
%timeit self.with_context({"a": "ok"})
%timeit self.with_context({"a": "ok"}, b=1, a=5)
1.85 μs ± 5.93 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
2.36 μs ± 22.4 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
2.16 μs ± 19.8 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
2.31 μs ± 66.3 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
AFTER
1.86 μs ± 21.6 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
2.28 μs ± 27.1 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
2.08 μs ± 18.3 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
2.17 μs ± 23.9 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
```
## field get ensure one
Strip 10ns of ~400 just by removing a function call.
```python
In [2]: %timeit self.name
392 ns ± 3.16 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
In [7]: %timeit len(self._ids) == 1
16.9 ns ± 0.0621 ns per loop (mean ± std. dev. of 7 runs, 100,000,000 loops each)
In [8]: %timeit self.ensure_one()
24.9 ns ± 0.255 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)
```
## NewId.hash
Computes the hash with an overhead of 20ns in the first run, then we gain 54ns at each call. Since we lookup often, we gain some time.
```python
In [3]: %timeit hash(n)
94.5 ns ± 0.941 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)
In [4]: %timeit {NewId(ref=i) for i in range(1000)}
173 μs ± 1.55 μs per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
AFTER
In [4]: %timeit hash(n)
43.7 ns ± 0.181 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)
In [5]: %timeit {NewId() for i in range(1000)}
166 μs ± 2.07 μs per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prDocument-related automations have been adjusted to work with the updated way Odoo links multi-step server actions. This keeps document, accounting, project, signing, and WhatsApp workflows operating consistently after the underlying platform change.
Original PR description
*: documents{_account,_project,_sign}, whatsapp
This commit adapts modules that uses server actions of type "Multi" to
their new type of child's relation: one2many.
It also contains an adaptation for the automatic naming of a child
action of type "Send Whatsapp message".
Task: opw-4370092This update keeps India GST reporting aligned with recent changes to the Indian e-invoicing setup. It is a small internal compatibility change that helps preserve existing reporting and send/print flows without introducing new business features.
Original PR description
Minimal technical changes for the counter commit of communnity commit Before this `l10n_in_edi` dependency was `account_edi` this commits counter community commit removes the dependency of `account_edi` from `l10n_in_edi` this commit only changes the technical things related to `l10n_in_edi` related- - https://github.com/odoo/upgrade/pull/7098 - https://github.com/odoo/odoo/pull/191920 task-4190711
Appraisal survey templates included with the system are no longer limited to a single default language. This helps companies use appraisal surveys across all installed languages without extra configuration.
Original PR description
We have added a field on the model survey (lang_ids) that allow the user to define the language in which the survey is translated. The default value for this field is the current user language. To not limit all the survey created in demo/data to English, we set lang_ids to False for them which means that they are available in all installed language. Task-3884012
This update keeps the Kenyan OSCU point-of-sale product setup working after related product page changes in Odoo. It also updates automated checks for sales and subscription flows so they match the latest stock quantity process, reducing the risk of false test failures.
Original PR description
This commit aligns with the changes introduced in the related Community PR, where the header element is being removed from the main product template. See Community PR: https://github.com/odoo/odoo/pull/191742 Task: [4385237](https://www.odoo.com/odoo/my-tasks/4385237)
Tax integrations now use the sales or invoice line description instead of only the product name when sending line details. This gives tax providers clearer, more accurate context and keeps behavior consistent across invoices, sales orders, point of sale, and Brazil-specific tax flows.
Original PR description
We replaced the product name with the line description in stable for Brazil [1]. Now that we're in master, we can change the account_external_tax_mixin interface to add it properly and remove the need to browse the line. For consistency, we also do the same for sale.order now. [1] https://github.com/odoo/enterprise/pull/77610 task-4401787
The spreadsheet styling was updated to stay compatible with a recent change in the underlying spreadsheet component. This helps keep spreadsheet screens and side panels displaying correctly without changing business workflows.
Original PR description
The global directive `content-box` was removed in o-spreadsheet, this commits adapts the Odoo's scss to take this change into account. Task: 4550753
Users can now group search results by Properties in Frontdesk Visitors and HR Appraisal. This makes it easier to organize records by custom property information and quickly compare related entries.
Original PR description
**Specifications** : Add search group by **Properties** in following places: - Frontdesk Visitors - HR Appraisal Task-3989993
The spreadsheet edition styling was updated to match a recent change in the underlying spreadsheet component. This helps keep spreadsheet screens, comments, and side panels displaying consistently without changing user workflows.
Original PR description
The global directive `content-box` was removed in o-spreadsheet, this commits adapts the Odoo's scss to take this change into account. Task: [4550753](https://www.odoo.com/web#id=4550753&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
This update aligns several Odoo apps with newer email-style recipient handling, helping messages and suggested recipients behave more consistently. The changes are mostly internal adaptations, with limited direct impact for business users.
Updated multiple email templates and demo signatures to better handle double hyphens, improving how automated messages appear to recipients. This is a small consistency and presentation improvement across invoicing, appointments, documents, subscriptions, field service, localization, and payroll-related content.
Original PR description
Part of: https://github.com/odoo/odoo/pull/194131 Task-4485719