Daily updates from Odoo
Thursday, May 16, 2024
11 changes · 17.0
Enhancements to existing features
This update prevents sales teams from marking subscription contracts as "churned" if they have never been invoiced. Instead, uninvoiced contracts will be properly canceled rather than counted as churned. This ensures churn statistics accurately reflect only contracts that were active and invoiced, improving the reliability of business metrics.
Original PR description
…oiced Before this commit, salespersons could churn a contract that has not been invoiced. It would impact the churn statistics. If the invoice has never been created, a cancelation is more correct. taskid 3925539
Bank Indonesia has been added as a new currency rate provider option in Odoo. This enhancement allows businesses operating in Indonesia to access real-time exchange rates directly from Bank Indonesia, better aligning the system with local market needs and regulatory requirements.
Original PR description
Add Bank Indonesia as a provider or currency rate in order to align with the local market needs. Task id # 3217982 Forward-Port-Of: odoo/enterprise#62167 Forward-Port-Of: odoo/enterprise#61008
Avalara tax calculation fields are now automatically hidden for countries outside the United States and Canada, where the service is not applicable. This improves the user experience by reducing clutter and confusion for international users who don't need these fields.
Original PR description
Avalara fields should not be shown to countries that are neither US or Canada. This commit handles this. task-3477234
This update improves the module import functionality in Odoo's base system. The changes enhance how modules are imported and managed, making the system more reliable and efficient for administrators who need to install or update modules.
This update makes the "Flexible Pricelist" setting visible and available during Kiosk configuration. Previously, this important pricing option was hidden from users setting up self-order kiosks, limiting their ability to customize pricing strategies for their kiosk sales.
Original PR description
Before this commit: =========================== The "Flexible Pricelist" setting is hidden during Kiosk configuration. After this commit: =========================== The "Flexible Pricelist" setting is visible during Kiosk configuration. task-3693379
This update significantly speeds up the product variant creation process when dealing with many product options and exclusion rules. By optimizing how the system checks which product combinations are valid, operations that previously took over 15 minutes now complete in just 12 seconds, dramatically improving user experience when managing complex products with many variants.
Original PR description
When there are a relatively high number of exclusions + a lot of combinations for a given product_template, `create_variant_ids` can become slow. The main bottlneck is the call to…
When there are a relatively high number of exclusions + a lot of combinations for a given product_template, `create_variant_ids` can become slow. The main bottlneck is the call to `_is_combination_possible_by_config`. More specifically, calling `attribute_lines.product_template_value_ids` and `self._get_own_attribute_exclusions` for each combination is pretty slow. To speed that up, this commit introduces a new method, `_filter_combinations_impossible_by_config`. This method accepts a sequence of combinations and yield those that are valid w.r.t. the exclusions. Because values that only depends on self are computed once before looping through the combinations, this lead to a significant speedup. This method is a generator to avoid MemoryErrors, be able to raise a UserError after "creating" 1000 variants and be consistent with choices made in `_create_variant_ids`. https://github.com/odoo/odoo/blob/0042b9d3eece219d4e89fe9c6ecb9971a1f3bf12/addons/product/models/product_template.py#L710 #### speedup Customer saas-16.4 database with 378 templates, 3832 products, 44 product.attributes, 186 product.attribute.values, 79 product.template.attribute.lines, 484 product.template.attribute.values, 374 product.template.attribute.exclusions. No dynamic attributes. Timing to write on product.template, adding a new attribute value on a ProductTemplate Form increasing the number of combinations. | Combinations | Before PR | After PR | |:------------:|:----------------:|:--------:| | 4 | 219ms | 218ms | | 55 | 785ms | 440ms | | 216 | 1.36s | 592ms | | 1 944 | 28s | 809ms | | 33 048 | 5min30s | 3.78s | | 231 336 | +15min (timeout) | 12s | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#162239
The livechat application now loads significantly faster by removing unnecessary database checks. The initial loading time has been reduced from 1.88 seconds to 0.25 seconds on large databases, improving the user experience when opening the livechat interface. This optimization is especially beneficial for companies with large message databases.
Original PR description
## Description Since b2eaf32ba92e537c7eefba6489533613be1b8c91, channels that have no message aren't created anymore, so the assertion that if we have a livechat existing it has at least 1 message…
## Description
Since b2eaf32ba92e537c7eefba6489533613be1b8c91, channels that have no message aren't created anymore, so the assertion that if we have a livechat existing it has at least 1 message holds true. Therefor the leaf `('has_message', '=', True)` in many of the livechat related domains is not necessary. In a large database with millions of records on `mail_message`, loading the index on `res_id+model_id` from disk, even for an `Index Only Scan` can be really slow.
## Benchmark
Example for runtime on a staging database, with over 256M mail_messages, 600k discuss_channels, warm cache. Cold cache is around 10x slower in both cases. The bottleneck for loading the default Livechat view: `_compute_nbr_channel`
| | Before | After |
|---------|----------|----------|
| Timings | 1.88 sec | 0.25 sec |
## Reference
opw-3896457
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#165554
Forward-Port-Of: odoo/odoo#164752The spreadsheet feature has been updated to the latest version with performance improvements. These updates optimize how the spreadsheet processes and handles data, making it faster and more efficient for users working with spreadsheets in Odoo.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/1f9074998 [REL] 17.0.22 Task: 0 https://github.com/odoo/o-spreadsheet/commit/0752f9c15 [PERF] tokenizer: avoid useless array map Task: 3920705 https://github.com/odoo/o-spreadsheet/commit/dceb0c47a [PERF] tokenizer: avoid regexp match Task: 3922347
This update automatically activates Tax Deducted at Source (TDS) and Tax Collected at Source (TCS) taxes in the Indian localization module. These are important tax mechanisms in India, and enabling them by default ensures businesses have immediate access to these required tax features without manual configuration.
Original PR description
This commit sets TDS (Tax Deducted at Source) and TCS (Tax Collected at Source) taxes to be active by default. task-3745995
The issue reporting templates on GitHub have been enhanced to provide a better user experience for reporting bugs and issues. This includes improved template structure and the addition of redirect links to help users navigate more efficiently when submitting issues to the Odoo project.
When an IoT box encounters a Python version incompatibility with Odoo, users previously saw a blank 502 error page. This improvement adds a custom error page that displays helpful information to users when this issue occurs, making it easier to diagnose and resolve the problem.
Original PR description
[IMP] point_of_sale: adding a custom page on iot box's nginx server to catch 502 errors Current behavior: When the IoT box's python version is not compatible with the Odoo's one, Odoo server crash and let nginx generate a 502 error with no information for the user After this commit: When the error is triggered, a custom page will be shown to the user `502.html` is the page who will be displayed to the user `default` is the config of nginx, which is responsible to link the html page with error triggered opw-3853501 Forward-Port-Of: odoo/odoo#163137