Daily updates from Odoo
Friday, November 8, 2024
6 changes · 18.0
Enhancements to existing features
User lookup by display name has been adjusted to avoid a slow database search pattern on very large user lists. This restores the previous behavior and can reduce searches from many seconds to milliseconds, improving responsiveness in user-related screens and operations.
Original PR description
After removal of _name_search(), the res.users `_search_display_name()` has been rewritten to use an `OR` to match either exactly the login or part of the name; this make the query very inefficient as it prevent PostgreSQL to use the index an any of the two fields.
This commit re-introduce the previous behavior: we first check for an exact users match on the login or (if none) we fallback to standard display name search (for `name`).
With a database will multiple millions of users:
Before:
```
In [1]: %time env["res.users"].search([('display_name', 'ilike', 'OdooBot')])
CPU times: user 2.03 ms, sys: 8 µs, total: 2.04 ms
Wall time: 16.8 s
```
After:
```
In [1]: %time env["res.users"].search([('display_name', 'ilike', 'OdooBot')])
CPU times: user 1.21 ms, sys: 1.87 ms, total: 3.08 ms
Wall time: 6.69 ms
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prResolved issues and error corrections
This update brings the spreadsheet component to a newer version with fixes for pivot tables, formulas, chart display, and Excel export. Users should see more reliable spreadsheet calculations and clearer chart behavior, especially around errors, empty references, pie charts, and translated chart labels.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/5fa5fbb4a [REL] 18.0.3 Task: 0 https://github.com/odoo/o-spreadsheet/commit/09860796e [FIX] pivot: skip cells on…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/5fa5fbb4a [REL] 18.0.3 Task: 0 https://github.com/odoo/o-spreadsheet/commit/09860796e [FIX] pivot: skip cells on manipulated pivot array formulas Task: 4292134 https://github.com/odoo/o-spreadsheet/commit/03d7080d3 [FIX] functions: FILTER with strings and errors Task: 4307604 https://github.com/odoo/o-spreadsheet/commit/eb4c13091 [FIX] charts: do not show zero values in pie charts Task: 4277144 https://github.com/odoo/o-spreadsheet/commit/3eac11e86 [FIX] index: export chart translation terms Task: 3978443 https://github.com/odoo/o-spreadsheet/commit/262b1bc2a [FIX] tests: remove WAIT funtion Task: 4306250 https://github.com/odoo/o-spreadsheet/commit/70f58fa2d [FIX] tests: bad separator in xlsx export Task: 4306250 https://github.com/odoo/o-spreadsheet/commit/ec41486b9 [FIX] tests: remove async function export test Task: 4306250 https://github.com/odoo/o-spreadsheet/commit/c78551c57 [FIX] xlsx: convert #REF at export to xlsx Task: 4207052 https://github.com/odoo/o-spreadsheet/commit/bebac5f29 [FIX] parser: inconsistent handling of #REF Task: 4207052 https://github.com/odoo/o-spreadsheet/commit/c53e76933 [FIX] charts: correct stacked checkbox label Task: 4251670 https://github.com/odoo/o-spreadsheet/commit/5ebba297c [REM] charts: clean createLineOrScatterChartRuntime Task: 0 https://github.com/odoo/o-spreadsheet/commit/d3a2181b7 [FIX] charts: fix trend line for datetime Task: 0 https://github.com/odoo/o-spreadsheet/commit/69a8602cd [FIX] chart: missing checkbox label for combo chart Task: 4283173 Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Mehdi Rachico (mera) <mera@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
This fixes an error that could stop invoice PDFs from being generated in the Argentina and Chile localization modules. Users can now print affected invoices without the system failing due to an internal naming mismatch.
Original PR description
The function `_exclude_tax_group_from_tax_totals_summary` does not exist. It should be `_exclude_tax_groups_from_tax_totals_summary` instead. This is the same issue for the l10n_cl and l10n_ar module…
The function `_exclude_tax_group_from_tax_totals_summary` does not exist. It should be `_exclude_tax_groups_from_tax_totals_summary` instead.
This is the same issue for the l10n_cl and l10n_ar module since it's just a call to a non-existent function.
### Steps to reproduce:
- Install the l10n_ar module
- Create an invoice with the document type set to "Invoice C"
- Add a line that includes a tax
- Try to print using the "PDF without payment" button
### Traceback:
```
File "/Users/louis/Development/odoo_src/core/odoo/odoo/addons/base/models/ir_qweb.py", line 600, in _render
result = ''.join(rendering)
^^^^^^^^^^^^^^^^^^
File "<778>", line 107, in template_778
File "<778>", line 89, in template_778_content
File "<778>", line 77, in template_778_t_call_0
File "<1056>", line 2228, in template_1056
odoo.addons.base.models.ir_qweb.QWebException: Error while rendering the template AttributeError: 'account.tax' object has no attribute '_exclude_tax_group_from_tax_totals_summary' Template: l10n_ar.report_invoice_document
Path: /t/t/div[2]/div/div[4]/div[1]/div[1]/div/table/t[1]/t[2]
Node: <t t-set="currency" t-value="o.currency_id"/>
```
opw-4253265This update improves how ISO 20022 payment files are generated, especially for SEPA and Swiss payments. It prevents incorrect SEPA labels on non-SEPA payments, removes unnecessary transfer wording, and restores important batch payment validation so payment issues are caught earlier.
Original PR description
[FIX] account_iso20022: Don't report 'SEPA' as Service Level in ISO20022 files 'SEPA' used to be the default for SvcLvl files, which meant even non-SEPA files would have it set to 'SEPA', unless they…
[FIX] account_iso20022: Don't report 'SEPA' as Service Level in ISO20022 files 'SEPA' used to be the default for SvcLvl files, which meant even non-SEPA files would have it set to 'SEPA', unless they explicitly overrode the function defining the value of the node. This commit fixes this, by not setting any value to SvcLvl by default, and overriding for SEPA payments. ========================================================= [REF] account_iso20022: compute BIC tag depending on the payment method consistently The CdtrAgt node did not compute the tag of its BIC node in the same way as the DbtrAgt node, calling the dedicated helper. Because of that, it required a bit more payment method-specific code in SEPA, so that BIC becomes BICFI in the latest version. This commit removes that and calls the appropriate helper everywhere. ========================================================== [IMP] account_iso20022: Don't put 'SCT' in InstrId anymore Before this commit, each payment's InstrId always contained 'SCT' (unless a memo was set on the payment), standing for "SEPA Credit Transfer". For non-SEPA ISO20022, this did not make sense. Since this having this additional info in the field has not additional informative value anyway, we simply remove it. ========================================================== [FIX] account_iso20022: fix batch payments' error check 'posted' state does not exist on payments anymore. Anyway, this check was useless. Though, it prevented any of the error checks to run. Also, a condition had been mistakenly removed in the handling of payments with a too big amount. [IMP] account_iso20022: proper check on maximum amounts SEPA Credit Transfer documentation gives a maximum of 999,999,999.99 € to instructed amounts (https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2023-11/EPC132-08%20SCT%20C2PSP%20IG%202023%20V1.1.pdf page 101). Swiss ISO 20022 uses 9,999,999,999.99 instead (https://www.six-group.com/dam/download/banking-services/standardization/sps/ig-credit-transfer-sps2024-2.1.1-en.pdf, page 52). The check we ran before this commit was wrong. It checked 11 characters (coma included), while it's actually not included, for payments in EUR, and added another limit of 15 characters for other amounts. We relax it to put the proper restrictions when we know them, and not enforce another when we don't.
This update fixes several issues affecting payroll, rental sales, customer portal access, live chat messages, accounting reports, and inter-company stock validation. It improves reliability and user experience by preventing unnecessary payslip recalculations, removing access errors for portal users, restoring correct report layout, and ensuring business workflows continue without blocking errors.
The Sign app now avoids an error that could occur after choosing an option from the Tools dropdown and then scrolling. This keeps document preparation smoother and prevents users from being interrupted by a crash.
Original PR description
Before this fix, clicking any item in the dropdown under "Tools" caused a traceback when scrolling vertically or horizontally. This commit ensures that we check if the canvas is rendered before proceeding with the code, preventing the error. task-4212762