Wednesday, April 2, 2025
5 changes · 18.0
New functionality added to Odoo
This update adds Touch 'n Go eWallet and WeChat Pay as available Xendit payment methods for Malaysia. Businesses using Xendit can offer customers more local digital wallet choices at checkout, which may improve payment convenience and conversion.
Original PR description
Added Touch'n Go ewallet payment Added Wechat Pay ewallet payment 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
Opening and navigating the Knowledge app is now significantly faster, especially when loading articles and the sidebar. The access-checking process was optimized to reuse existing permission data and avoid inefficient lookups, reducing wait times for users without changing who can access content.
Original PR description
Description ----------- The non-stored field `user_has_access` is the primary `ir.rule` used for a `knowledge.article` and is included in every query. As a result, the method…
Description
-----------
The non-stored field `user_has_access` is the primary `ir.rule` used for a `knowledge.article` and is included in every query. As a result, the method `_search_user_has_access` is frequently called and quickly becomes a performance bottleneck. This is particularly noticeable when opening the Knowledge app, as it involves reading the displayed article along with loading the sidebar.
This update optimizes the method as follows:
- For generic article access, the optimization leverages the field `inherited_permission`, which already contains the propagated `internal_permission` of the article along the hierarchy. This removes the need to recompute these permissions dynamically with a complex query since the data has already been precomputed.
- For member access, the query logic has been revised while maintaining the same outcome: Previously, the process involved: `for all articles, append the member and their permission, recurse into child articles for all in-sync and permissionless articles, and propagate the member's permission. Finally, discard all articles without any set permission.`, The new approach reverses the logic to avoid the need for discarding at the end and iterating through all articles: `for the articles the member belongs to, propagate the member's permission to its child articles, provided the child is in-sync, has no explicit permission, and the partner is not already a member of that article.` Although the last condition may seem counterintuitive, the initial set of articles considered encompasses those the member is linked to already. This also avoids cases where a parent article's member permission would overwrite differing permissions on its child articles.
- Additionally, `set` manipulations are used to handle IDs, thereby preventing the injection of large ID lists into multiple domain leaves. This improves query parsing and avoids poor query execution plans that could be caused by excessively large ID lists.
Benchmark
---------
On odoo.com, opening the Knowledge app from the Apps dashboard:
| Request | Before | After | Speed-up |
|----------------------|--------|-------|----------|
| web_read | 1.69s | 160ms | **10x** |
| get_sidebar_articles | 1.64s | 160ms | **10x** |
In a shell, searching articles with `[('user_has_access', '=', True)]`:
| User Type | Before | After | Speed-up |
|-----------------------|--------|-------|----------|
| `sudo` | 251ms | 35ms | **7x** |
| regular internal user | 577ms | 58ms | **10x** |
Reference
---------
task-4633813
Notice
------
⚠️ Note to clients/partners that might read this: For the full benefits of the patch, deploy the indexes that were added in this PR. This can be done by Upgrading the module `knowledge`, or creating the indexes manually in database. The patch should still be a net-benefit even for database without the indexes deployed.Resolved issues and error corrections
Global invoices in Mexico now use the payment method tied to the largest paid amount, rather than the largest order. This helps ensure invoice details better match the actual payments received, reducing reporting errors and correction work.
Original PR description
We need to use the payment method linked to the biggest paid amount, not the payment method linked to the biggest order.
The Mexican Chart of Accounts report now formats the certificate number correctly so it meets the required 20-character standard. This helps companies generate valid XML reports for tax compliance and keeps the value consistent with CFDI reporting.
Original PR description
After the refactor by https://github.com/odoo/enterprise/commit/84cc09959d82dbceb4fe673b85464ef3d8630606 the noCertificado field in the COA (Chart of Accounts) report became invalid. - On a Mexican company, generate the COA report from the Trial Balance. - In the generated XML, the noCertificado tag exceeds 20 characters. This tag should contain exactly 20 characters and match the noCertificado from the CFDI report. This commit applies the same string manipulation for the COA repoart as the cfdi report (in the _add_certificate_cfdi_values method in the l10n_mx_edi module) source: http://www.sat.gob.mx/esquemas/ContabilidadE/1_1/BalanzaComprobacion/BalanzaComprobacion_1_1.xsd opw-4644489
Files in the Finance document area are now organized and managed through folders instead of tags. This makes finance document handling clearer and aligns related automated actions with the new folder-based structure.
Original PR description
Files inside Finance folder are now managed in folders instead of tags. Changed the server actions to use the created folders.