Thursday, February 16, 2023
11 changes · master
Enhancements to existing features
Odoo’s internal search logic has been redesigned to make complex filtering easier to express and more efficient to process. This helps core apps run cleaner database queries and enables more advanced business searches, especially across related records such as orders, tags, activities, and products.
Original PR description
The main goal is to rationalize the use of operators to simplify query generation and to make it possible to run optimizations to send a more efficient query to the database. Domain rewriting and…
The main goal is to rationalize the use of operators to simplify query generation and to make it possible to run optimizations to send a more efficient query to the database. Domain rewriting and optimization is separated from query generation which accepts a fixed set of operators.
The main new introduced operator is **any** (and its inverse **none**) which apply to relational fields: these are quantifiers which have as a value another domain that will be applied on the comodel.
It allows to specify domains which were not possible to express before:
- which res.partner has a confirmed order where the price > 1000
`[('sale_order_ids', 'any', [('state', '=', 'sale'), ('amount_total', '>', 1000)])]`
- which res.partner does not have a tag 'x'
`[('category_id, 'none', [('name', '=', 'x')])]`
- which res.partner have or don't have expired quotations
The internal representation of domains as polish-notation lists is handy for serializing them. The new implementation uses a Domain class to represent domains which is backwards-compabile with the polish notation. To build domains, there is a D() builder function and you can still use AND() and OR() or infix operators.
The Domain instances should be considered as immutable.
list(D(some_domain)) # normalized some_domain
D('a', '=', 1) | ~D('b', '=', 2) == D(['|', ('a', '=', 1), '!', ('b', '=', 2)])
New operators can be added, check the 'ref' operator for an example. The new API is used in some core modules to show can what is possible. At the same time, we have an `unaccent` implementation in python for filtered_domain.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prOdoo now uses the standard Python approach for organizing its internal packages, replacing older compatibility behavior. This simplifies maintenance and reduces future upgrade risk without changing day-to-day business functionality.
Original PR description
PEP 420 (blaze it)
Project recurring tasks now use hidden templates so users can delete or archive individual tasks without accidentally breaking future recurrences. Users also get clearer options to continue or stop a recurrence, making recurring work easier to manage in common cases like skipped meetings or ended routines.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The invoice Send & Print process has been streamlined to make it clearer and faster for users. It avoids unnecessary PDF regeneration, better prepares electronic document actions, and reorganizes the workflow so invoice delivery is easier to manage.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The accounting report queries have been optimized to reduce unnecessary database scanning. This should make reports such as Trial Balance load faster, especially for companies with large account lists.
Original PR description
Without `auto_join=True` a query the Trial Balance report has extra tables scanning because of the following where condition: ``` "account_move_line"."account_id" in ( SELECT "account_account".id…
Without `auto_join=True` a query the Trial Balance report has extra tables
scanning because of the following where condition:
```
"account_move_line"."account_id" in (
SELECT
"account_account".id
FROM
"account_account"
WHERE
(
"account_account"."user_type_id" in (
SELECT
"account_account_type".id
FROM
"account_account_type"
WHERE
(
"account_account_type"."include_initial_balance" IS NULL
or "account_account_type"."include_initial_balance" = false
)
)
)
AND (
"account_account"."company_id" IS NULL
OR (
"account_account"."company_id" in (1)
)
)
)
```
---
task-2743905
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-prThe Dutch localization now uses current VAT rates and more accurate accounting mappings for stock valuation, input/output accounts, tax groups, and fiscal positions. This helps Dutch companies produce more reliable accounting records and avoids outdated or invalid tax options.
Original PR description
…position, tax group --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The web testing tools now better mirror how Odoo groups and summarizes records, including list-style summaries for linked records and numeric fields. This makes automated tests more reliable and helps reduce the risk of issues reaching users.
VAT identification labels have been updated for Latin American countries with major localizations. This helps users see country-appropriate tax terminology in accounting and company records, reducing confusion during setup and daily operations.
Original PR description
Update the VAT label for the latam countries with major localizations. 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 makes recurring planning shifts easier and safer to manage by showing clearer recurrence details and asking users how broadly edits or deletions should apply. It also preserves planned dates when copying project and field service tasks, improving scheduling consistency across teams.
Original PR description
wip
Knowledge article cover images can now be adjusted vertically so important parts of the image remain visible instead of being awkwardly cropped. This gives users more control over how articles look, while keeping the feature off mobile where covers already display fully.
Original PR description
Purpose: -------- Covers have a non-standard format and often end up badly positioned (not showing the image's main object or cropping it). One can now reposition the image (vertically) to alleviate this issue, using the `reposition cover` button, and then dragging the image. This is not available on mobile devices, because the covers are entirely displayed on small screens (and can therefore not be repositioned). Specs: ------ Cover images are displayed using the `object-position` property, allowing to specify the position of the images inside their own content boxes (eg. a value of `50% 50%` centers the image). `knowledge.cover` model has a new field `height`, used to store the vertical position of the image (percentage value, `default=50`). This height value is used in the templates to set the `object position` property, so that the cover is rendered correctly, without flicker to reposition it. Task-3040156
Financial reports now filter accounting records more directly, avoiding unnecessary database work. This improves report loading performance significantly, especially for companies with large volumes of accounting entries.
Original PR description
Before there were where-condition that requires extra table scanning ``` ... AND ( "account_aged_receivable"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE (…
Before there were where-condition that requires extra table scanning
```
...
AND (
"account_aged_receivable"."account_id" in (
SELECT
"account_account".id
FROM
"account_account"
WHERE
(
"account_account"."internal_type" = 'receivable'
)
AND (
"account_account"."company_id" IS NULL
OR (
"account_account"."company_id" in (
1
)
)
)
)
)
```
Benchmarks for a dummy DB with 1M account.move.line records:
total time for `get_report_informations` drops from 1500 ms to 150 ms
---
task-2737991