Daily updates from Odoo
Tuesday, March 5, 2024
110 changes
New functionality added to Odoo
This update adds PDF viewing capabilities to the Odoo platform. The enhancement improves the user experience by enabling direct PDF document viewing within the web interface, reducing the need for external tools and streamlining document management workflows.
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
Enhancements to existing features
This update significantly speeds up the process of creating automatic reorder points in your inventory system. By optimizing how the system calculates product stock levels across multiple warehouse locations, the operation now completes 16-30 times faster, reducing processing time from several seconds to under a second for typical configurations.
Original PR description
This commit changes the computation of product having a negative forecasted quantity to create manual orderpoints. The issue was that each replenish location needed multiple `_read_group` on…
This commit changes the computation of product having a negative forecasted quantity to create manual orderpoints. The issue was that each replenish location needed multiple `_read_group` on `stock.quant` and `stock.move` on all storable product. This commit makes only 3 `_read_group`s for all products x locations and post process the group and quantity sum by location in Python. This method gives some performance gain in time as well as in memory consumption Task: 3653272 Here is the time comparison before/after the patch for different configuration | | before | after | |---|---|---| | 700 loc, 300 prod | 14.08s | 850ms | |10 loc, 3k prod | 2.174s | 349ms | |700 loc, 30k prod | TO | 74s | 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 Forward-Port-Of: odoo/odoo#154596 Forward-Port-Of: odoo/odoo#149966
This update improves the performance of spreadsheet reports by reducing unnecessary recalculations when filters are used. When loading reports with filter references, the system now waits for all data to be ready before recalculating, rather than recalculating after each individual data fetch. This change reduces loading time for the Timesheet report from approximately 10-15 seconds to 6-9 seconds by eliminating redundant calculations.
Original PR description
Steps to reproduce:
- create a relational filter, let's say on `res.company`
- add a default value
- reference the filter in a cell with `=ODOO.FILTER.VALUE("my filter")`
=> every `ODOO.FILTER.VALUE` triggers an evaluation
With this commit, the re-evaluation after the data is fetched uses the
data source mechanism which only re-evaluates when all the data promises
are resolved, instead of evaluating after every resolved promise.
With this commit, the number of evaluations required when loading the
Timesheet report on our prod goes from 5 evaluations to only 3 (each evaluation
is 2-3s) because `ODOO.FILTER.VALUE("Company")` is present two times.
One issue this commit doesn't fix: there one RPC per `ODOO.FILTER.VALUE`
(can be fixed in master very easily because we refactored data fetching)
Task: 3787125
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update corrects terminology and adds Italian language translations to the Italian EDI (Electronic Data Interchange) website sales module. The changes ensure that Italian users see properly translated and accurate terms throughout the module, improving the user experience for Italian-speaking customers and businesses using this e-commerce feature.
Original PR description
Correct the terms in this module and translate them in Italian. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#155993 Forward-Port-Of: odoo/odoo#155905
Resolved issues and error corrections
The preview button on course pages was not displaying with the correct visual styles for enabled or disabled content. This fix restores the proper button appearance so users can clearly see whether content previews are available or restricted.
Original PR description
Bug ===== Click the `preview` button on the course page. It does not apply the proper styles to the button used for enabled or disabled content previews. Technical =========== With commit https://github.com/odoo/odoo/commit/2d386bc437194b78ea5d446d7b0fa4f5444406e2, the `badge-hide` class used for the `preview` button was replaced and some styles were altered. After this commit ================== The `preview` button is functioning properly. Task-3751285 Forward-Port-Of: odoo/odoo#155003
This fix resolves an infinite loop issue that occurred in the Trial Balance report when account groups had circular parent relationships. The system now includes proper validation to prevent recursive parent-child relationships in account groups, ensuring the Trial Balance report runs smoothly without freezing.
Original PR description
# Issue: Infinite loop in Trial Balance. # Analyze: The infinite loop is due to account_reports.models.account_report.AccountReport.get_account_codes `while group:` loop if a recursion exist in group.parent_id there is an infinite loop. # Fix: Ensure the no recursion constrains on parent_id in account_reports. # Related tasks: opw-3665256 opw-3700368 Forward-Port-Of: odoo/odoo#156321 Forward-Port-Of: odoo/odoo#150171
This fix resolves crashes that occurred when viewing tasks or records after upgrading to version 17.0, particularly when certain fields were removed during the upgrade process. The system now handles tracking information more carefully to prevent errors when displaying change history in emails and activity logs.
This fix addresses floating-point rounding errors that were occurring in electronic invoice price calculations. The system was using an ineffective rounding method that still produced incorrect decimal values (like 83.60000000000001 instead of 83.60). By switching to Python's built-in rounding method, invoice amounts are now calculated correctly, ensuring accurate electronic invoices for customers.
Original PR description
In [1], we added a rounding of the amounts in the `<PriceAmount>` tags to avoid floating point rounding errors. However, it seems the `float_round` function does not guarantee to avoid these errors. Take the example of `price_subtotal` = 250.80 and `quantity` = 3. We will compute the PriceAmount as 250.80 / 3 which yields 83.60000000000001. Even when using `float_round(amount, 10)`, it still results in the same amount with the rounding error. For that reason we use the built-in `round` method of Python instead. [1] 58d57bbbaaab32ba0183890a9182e6de09b32ac5 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#155949 Forward-Port-Of: odoo/odoo#155570
This update prevents the messaging system from sending unnecessary notifications when there are no channel members to update. Previously, this could cause errors by creating invalid channel member records. The fix improves system stability and reduces unnecessary notification traffic.
Original PR description
When there is no channel members to be updated the seen status, we should not send a notification to the channel members, otherwise, it will lead into creating a channel member with id undefined. test case added to check that the notification is not sent when there is no channel members to be updated. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix improves how the system detects duplicate accounts when loading chart templates. Previously, the system could miss duplicate accounts because it compared account codes before standardizing their format. Now it compares the properly formatted codes, preventing the creation of unwanted duplicate accounts in your chart of accounts.
Original PR description
**Description of the issue/feature this PR addresses:** Function `_pre_reload_data` checks for the existance of accounts with the same code to avoid creating a duplicate. It does so however comparing with the code before normalizing it with the length from the template, failing to find possible duplicates with a normalized code. **Current behavior before PR:** If accounts with non-normalized codes _(eg 172)_ are being loaded, there's a risk that an account with a matching normalized code _(eg 172000)_ already exists in the database. If the corresponding xmlid is not pointing at it, another account with the same code will be created triggering the ValidationError. **Desired behavior after PR is merged:** The comparison with existing accounts is made with the normalized code avoiding this conflicts. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156119 Forward-Port-Of: odoo/odoo#155256