Daily updates from Odoo
Friday, January 26, 2024
12 changes
5 changes
Enhancements to existing features
Odoo now avoids repeated language checks during common cached reads, improving performance for translated content. It also validates languages when creating, updating, or fetching translated fields, reducing the risk of data being handled in the wrong fallback language.
Original PR description
[IMP] core: better lang check Before this commit, we check if language is valid and active when `env.lang`. 1. SQL f'->>{env.lang}' is safe 2. `env.lang` is frequently called and slow This commit a)…
[IMP] core: better lang check
Before this commit, we check if language is valid and active when `env.lang`.
1. SQL f'->>{env.lang}' is safe
2. `env.lang` is frequently called and slow
This commit
a) removes language check for `env.lang` to improve performance.
The field value reading time for translated field is reduced by 50% when the
field value has been cached.
b) adds language check when necessary
currently when you read/write in inactive or invalid language, you will actually
read/write in en_US. It would be safer to raise an error instead of doing
everything in en_US especially when some rpc read/write script forgets a
language is inactivated in the server
For feature, the added language validation happens when
1. `write` translated fields
2. `create` records with translated fields
3. `fetch` field values for translated fields
For performance the added language validation shouldn't happen when
1. `read` cached translated field value
c) for sake of a) the `env.lang` is not safe anymore
the following commits refactor SQL queries to avoid SQL injection with the help
of `_field_to_sql`
https://github.com/odoo/odoo/pull/142814Planning settings now clearly separate shift swapping from employees unassigning themselves, making it easier for managers to choose the right behavior. Future-dated timesheets are also hidden from validation menus to avoid showing work items that cannot yet be approved.
Original PR description
Before this commit, it was not clear to users that the 'switch shifts' feature existed, and that is it mutually exclusive with the 'allow unassignment' option in the settings. To make things clear, this commit splits the 'allowing unassignment' setting in two: - The 'switch shifts with other employees' option which corresponds to the current behavior when the 'allow unassignment' feature is disabled. It is the default value. - The 'unassignment themselves from shifts' option which corresponds to the current behavior when the 'allow unassignment' feature is enabled. task-3703648
The GSTR return period form now hides the tax unit option when no tax unit is available. This keeps the form cleaner and avoids showing users an irrelevant choice.
Original PR description
In this PR ------------- **[IMP] l10n_in_reports_gstr: hide tax unit if not available** - This commits hides the tax unit for gstr return period form if no tax unit is available task-3679488
Financial reports now include an option to display amounts in thousands, making large figures easier to read and compare. This helps users review high-level financial results more quickly without changing the underlying data.
Original PR description
Add an option/filter to display amount in thousands. task-3626894
The online sales templates for rentals and subscriptions were simplified after related product page caching was removed. This keeps the website sales experience aligned with platform changes and should make future maintenance easier without changing visible business workflows.
Original PR description
Now that the cache has been removed from product page, those templates (or part of) can be simplified. See also: https://github.com/odoo/odoo/pull/145532 https://github.com/odoo/upgrade/pull/5422
7 changes
Enhancements to existing features
This update improves how payment tokens are created for subscription renewals by including Monthly Recurring Revenue (MRR) information. This allows the system to automatically set appropriate spending limits on payment tokens based on each subscription's actual monthly value, reducing payment processing issues and improving security.
Original PR description
This commit add MRR in `_get_mandate_values` return dict to use it in at time of token creation to set max amount according to MRR of subscription. See also: - https://github.com/odoo/odoo/pull/150410
This update removes two outdated account codes (999001 and 999002) from the Bulgarian financial reports that were previously used to categorize extraordinary income and expenses. This ensures the profit and loss reports now accurately reflect the current chart of accounts structure used in Bulgaria.
Original PR description
999001 and 999002 are no longer used for extraordinary income/expenses. This commit removes them from the domains of the corresponding report. Task ID: 3672294 Forward-Port-Of: odoo/enterprise#55022 Forward-Port-Of: odoo/enterprise#54491
The payroll dashboard now loads warning messages faster by retrieving them in the background instead of making users wait. This improvement reduces load times and makes the payroll application more responsive for HR teams managing employee payments.
Original PR description
In this PR we improve the usability of a production payroll app where dashboard warnings might take a long time to load by loading them asynchronously using rpc calls. task-3597092
This fix eliminates redundant data evaluations when spreadsheets load multiple data sources simultaneously, dramatically improving performance. In real-world scenarios with many data sources, spreadsheet loading time is reduced from 33 seconds to 7 seconds. The trade-off is that cells will show "Loading..." until all data sources are ready, rather than updating incrementally.
Original PR description
In a spreadsheet with multiple data sources (2 pivots), each data source initially loads and triggers a new evaluation upon loading. This results in two evaluations, even if both data sources resolve…
In a spreadsheet with multiple data sources (2 pivots), each data source initially loads and triggers a new evaluation upon loading. This results in two evaluations, even if both data sources resolve in less than 10ms apart. In such cases, the first re-evaluation becomes redundant, as a new one is immediately triggered. The issue is worse when more than 6 RPCs are required, as most browsers limit network calls to 6 in parallel. Consequently, the 7th RPC will unnecessarily wait after the evaluation triggered by the first RPC to resolve. For spreadsheets with many many data sources, the accumulation of these pointless evaluations significantly impacts performance. In a real-life scenario with 18 data sources from our production database, the spreadsheet took approximately ~33s to fully load and become reactive. With this commit, the loading time is reduced to ~7s (only one evaluation instead of 18). Note that this testing was conducted locally, with minimal latency, and with a limited amount of data. One consequence of this commit is that cells won't load incrementally as each data source loads. Instead, all cells will display "Loading..." until all data sources are loaded. Given the substantial speed improvement, we consider this trade-off worthwhile. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149767
This improvement adds a validation check to determine if a point of sale order can be paid before actually processing the payment. This allows businesses to control when the Pay button is available (for example, disabling it on the Product Screen) without needing to execute the full payment function, providing better control over the checkout experience.
Original PR description
With this change, we can set other conditions easily. Also, it allows us to check if it can be payed without actually executing the pay function, because sometimes we don't want to change the screen but we want to check if the order can be processed for payment. For example, we could disable the Pay Button from the Product Screen --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update applies miscellaneous improvements to Bulgaria's localization module, including adjustments to the Chart of Accounts, tax configurations, and fiscal position settings. These changes ensure the accounting system accurately reflects current Bulgarian regulatory requirements and improves the overall accuracy of financial reporting for Bulgarian businesses.
Original PR description
This commit adds misc changes to CoA, Taxes and Fiscal Positions. Task ID: 3672294 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#150850 Forward-Port-Of: odoo/odoo#149696
This update significantly improves the speed of select menus when working with forms containing many options. Previously, the system was unnecessarily re-sorting menu options every time the page loaded, causing delays and potential browser crashes. Now sorting only happens when the menu opens, making selections and deletions up to 20 times faster in real-world scenarios.
Original PR description
## Description Having several select menu containing a lot of options on a page may lead to significant wait times and browser crashes when selecting or deleting a value. ## Analysis Sorting of the…
## Description Having several select menu containing a lot of options on a page may lead to significant wait times and browser crashes when selecting or deleting a value. ## Analysis Sorting of the options is being computed on each mounted select menu during the useEffect() hook since this commit: https://github.com/odoo/odoo/commit/8a4485748f49c5b8fdb780b0bcd2435eeadd63b. ### Before this commit All of the select menu are sorted when the user select a value in one of them. This is not necessary as the sorting is already handled in beforeOpen. ### After this commit Selecting or deleting a value from a select menu is significantly faster as the sorting is not being unnecessarily computed in useEffect() anymore. ## Benchmarks When importing an Excel file containing 70 columns as an invoice with subfields search enabled, selecting/deleting an option from a select menu: | | Before | After | |-------------|---------|--------| | Selecting | 31.2 s | 1.5 s | | Deleting | 35.9 s | 1.6 s | ## References opw-3616438 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#146324