Monday, February 12, 2024
10 changes · 17.0
Enhancements to existing features
This update improves the performance of spreadsheet dashboards by eliminating an unnecessary network request that was previously made to fetch currency information. The currency is now loaded directly with the dashboard, reducing load time and improving the overall user experience when opening dashboards with monetary amounts.
Original PR description
Most (if not all) dashboards have monetary amounts. They are formatted with the main company currency format. Before this commit, a RPC was made to fetch the company currency. With this commit, the dashboard is loaded with the currency. It saves one network request and a full spreadsheet evaluation (which would have occured after the request is done) Task: 3709466
This update adds support for easyShip as a delivery carrier option in the Amazon sales integration. This enhancement allows businesses using Odoo to offer easyShip as a shipping method when fulfilling Amazon orders, expanding delivery options for customers and improving logistics flexibility.
Original PR description
task-3533500 Forward-Port-Of: odoo/enterprise#55990
The LinkedIn integration has been updated to use the newest LinkedIn API version (202401) to ensure continued compatibility and support. While this upgrade maintains the same functionality, it requires more API calls to fetch data since the API no longer supports batch data retrieval. This may result in slightly slower performance when syncing LinkedIn pages and comments, but ensures the system remains current with LinkedIn's latest requirements.
Original PR description
Purpose ======= On the 3 December 2023, we are using the API version 202211. However, the version 202209 is depreciated, so it might be the time to upgrade. Technical ========= The only technical change is the fact that projections are removed. Those were useful to fetch everything we needed in a single HTTP request, and so now, we have to make many HTTP requests to fetch the data (at least, one per "model"). Task-3620605 Forward-Port-Of: odoo/enterprise#56227 Forward-Port-Of: odoo/enterprise#52006
This update optimizes how the Approvals module searches for records by simplifying database queries. The change removes unnecessary steps in the search process, allowing the system to retrieve information more directly and quickly. This results in faster performance when the approval system filters and retrieves data.
Original PR description
## Description
Domains of the form
```python
[('stored_Many2X.id', '=/!=/in/not in', list_of_ids)]
```
will force the ORM to generate a sub-`SELECT` (or `LEFT JOIN` in case of `auto_join=True`), which is inefficient, as the `id` can be retrieved directly from the current `model` table, instead of going to fetch it from the `PKey` of the `comodel` table.
There is just one *important* detail - in the sub-select, the `ir.rule` of the `comodel` is applied, which is not the case when directly referencing the `field` from the `model`. So in some cases using an explicit `.id` would be a wanted, if the intention was to apply the `ir.rule`.
But in the context of domain in `ir.rule` themselves, the previous concern isn't of application, as `ir.rule` are generated in a `sudo` context, therefor no `ir.rule` are applied.
## Fix
Remove the `.id` from left leafs of domains from `ir.rule`
task-3735923This update adds a safety check to prevent system crashes when invoicing subscription orders that contain recurring products without an associated subscription plan. The improvement makes the system more robust by adding defensive programming to handle edge cases gracefully.
Original PR description
…roduct and no plan We prevent creating subscription sale orders with recurring products and no recurring plans However it's better to be defensive to avoid crashes. This commit adds an additional condition before accessing order_id.plan_id closes odoo/enterprise#56160 Task: 3725476
This update improves spreadsheet performance by eliminating unnecessary network requests when displaying monetary values. The system now uses currency information that's already available in the spreadsheet configuration, rather than making extra calls to fetch it. This results in faster spreadsheet loading times and a smoother user experience.
Original PR description
Pivot/list monetary fields needs the company currency to display the value in the said currency format. Until now, a RPC was made to fetch the currency. However, since odoo/o-spreadsheet@8710839 and odoo/enterprise@8c0a785 the currency format is already in the model config. There's no need for the RPC. This saves one network request and one full spreadsheet evaluation (which would have occured after the request is done) Note: This optimization currently doesn't work for dashboards. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update optimizes how the HR Homeworking module searches for employee records by simplifying database queries. The change removes unnecessary steps in the search process, allowing the system to find records faster without compromising accuracy. This results in improved system responsiveness when filtering employee data.
Original PR description
## Description
Domains of the form
```python
[('stored_Many2X.id', '=/!=/in/not in', list_of_ids)]
```
will force the ORM to generate a sub-`SELECT` (or `LEFT JOIN` in case of `auto_join=True`), which is inefficient, as the `id` can be retrieved directly from the current `model` table, instead of going to fetch it from the `PKey` of the `comodel` table.
There is just one *important* detail - in the sub-select, the `ir.rule` of the `comodel` is applied, which is not the case when directly referencing the `field` from the `model`. So in some cases using an explicit `.id` would be a wanted, if the intention was to apply the `ir.rule`.
## Fix
Remove the `.id` from left leafs of domains that if the field is stored, and the `comodel` doesn't have `ir.rule` associated with it, or the `ir.rule` application is redundant/not needed. `.id`
task-3735923
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update improves the speed of product filtering and search operations on the website sales module by optimizing how the system retrieves product information. The change simplifies database queries to be more efficient, resulting in faster page load times and better user experience when browsing and filtering products.
Original PR description
## Description
Domains of the form
```python
[('stored_Many2X.id', '=/!=/in/not in', list_of_ids)]
```
will force the ORM to generate a sub-`SELECT` (or `LEFT JOIN` in case of `auto_join=True`), which is inefficient, as the `id` can be retrieved directly from the current `model` table, instead of going to fetch it from the `PKey` of the `comodel` table.
There is just one *important* detail - in the sub-select, the `ir.rule` of the `comodel` is applied, which is not the case when directly referencing the `field` from the `model`. So in some cases using an explicit `.id` would be a wanted, if the intention was to apply the `ir.rule`.
## Fix
Remove the `.id` from left leafs of domains that if the field is stored, and the `comodel` doesn't have `ir.rule` associated with it, or the `ir.rule` application is redundant/not needed.
task-3735923
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update optimizes how the system handles Luxon date and time objects by preventing unnecessary performance overhead. Luxon objects are immutable and don't change, so the system no longer wastes resources trying to track changes within them. This results in faster performance when working with dates and times throughout the application.
Original PR description
When reading values in reactive objects, Owl's reactivity system will return reactive versions of the sub-objects to allow tracking reads in depth, so that changes to values in deep object hierarchies can still cause components to render themselves if needed. Luxon objects are immutable. Since they cannot change and values inside them cannot change either, tracking reads within luxon objects is pure overhead. This commit makes luxon objects non reactifiable by setting the Symbol.toStringTag property on the luxon classes, which is what Owl uses internally to determine if objects can be made reactive. It will also cause some of these objects to serialize to more specific strings instead of just [object Object], eg [object LuxonZone]. Forward-Port-Of: odoo/odoo#153387
The automated visitor cleanup job now allows administrators to customize how it processes old visitor records, making it easier to tune performance based on their system resources. This reduces unnecessary error messages and prevents potential timeout issues that could disrupt the cleanup process.
Original PR description
In b69917e[1] the cron implementation was changed to unlink old visitors in batches of 1000 records. This was meant to deal with memory/timeout errors when dealing with large amounts of records.…
In b69917e[1] the cron implementation was changed to unlink old visitors in batches of 1000 records. This was meant to deal with memory/timeout errors when dealing with large amounts of records. However it still searches for records with no limit, which in high record count scenarios and based on instance resources may still generate memory/timeout errors. Technically it could be considered "fine" for the cron to timeout since every batch is committed, so previously unlinked records are not rolled back and the cron should eventually delete them all. However there are some edge cases where memory/time out errors would not be fine, like the cron failing during the first batch, which means no unlink operations would be committed to the database. Errors that are "fine" also generate noise and leave administrators wondering which errors they should ignore and which they should not. It also alarms non-technical customers since after all, they are seeing a reported error. Therefore the search limit and batch size have been added as arguments to the cron. This is completely opt-in since they have the previous values as their defaults. This makes it easy to customize and tune the performance of the job accordingly if required. [1] https://github.com/odoo/odoo/commit/b69917ec0e508f8354d831525c5c48ee79b5967a --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#150476