Friday, June 21, 2024
3 changes · 17.0
Resolved issues and error corrections
Partner suggestions now appear much faster when using @ mentions in busy chat channels. This prevents the interface from freezing and makes conversations smoother for users in larger groups.
Original PR description
Before this PR, searching for a partner using a mention ("@") could take up to 18 seconds on a channel with 200 members. As a result, the UI would freeze while waiting for the search function to return partners to display.
After this PR, trying to mention a partner on the same channel only takes 80ms.
Most of the time was consumed by the `sortPartnerSuggestions` function, specifically by the `discuss.members` compare function that looped over every channel member twice per comparison.
The rest of the time was consumed by owl's `reactive` (~1/3 of the time).
To solve this issue, this PR focuses on two points:
- Providing a set of member partner IDs to the compare functions to speed up membership tests.
- Removing unnecessary reactive callbacks by using `toRaw` (searching partners is not coupled to rendering).This fix corrects multiple issues in the Spanish VAT Record Books (Libros Registro de IVA) report that was generating incorrect tax information. The report now properly handles credit notes, withholding taxes, intra-European transactions, and complex tax combinations on invoices, ensuring accurate tax reporting for Spanish companies.
Original PR description
**Steps to reproduce:** - Install l10n_es_reports - Switch to a Spanish company (e.g. ES Company) - Create some invoices/bills and credit notes using different types of taxes - Go to "Accounting /…
**Steps to reproduce:** - Install l10n_es_reports - Switch to a Spanish company (e.g. ES Company) - Create some invoices/bills and credit notes using different types of taxes - Go to "Accounting / Reporting / Statement Reports / Tax Report" - Select "Generic Tax Report" - Click on "VAT Record Books (XLSX)" to download the report **Issues:** 1) Credit notes appear as positive in the report 2) Withholding taxes (having type "Retencion") are not handled. They should appear in the dedicated column. 3) Intra-European bills have a tax that is reverted. So the tax amount should be 0, but it is not reverted in the report. 4) If an invoice has 2 lines that use 2 different taxes of type "Recargo de Equivalencia", one of them will not appear in the report. 5) Advanced combinations of taxes on several invoice lines are not supported. **Solution:** This fix changes the way of generating the Libros Registro de IVA report. Before this fix, the report was generated based on the tax lines. One line of the report was corresponding to a regular tax line, which didn't support advanced combinations of taxes on several invoice lines. This fix analyzes the taxes repartition on the invoice lines and tries to respect it when generating the report. A line of the report corresponds to a combination of taxes of different type: (IVA + surcharge tax + withholding tax) **Limitation:** Having 2 taxes of the same type on the same invoice line is not supported. The total and the tax amount will be correct but not the tax rate because a report line has only one column to display each type of tax. opw-3844967
This update fixes two critical issues in asset revaluation calculations. First, it corrects incorrect amounts when decreasing residual values on assets by preventing the deletion of draft moves that are scheduled for future posting. Second, it resolves a problem where already fully depreciated assets would incorrectly generate moves when sold or disposed of. These fixes ensure accurate financial reporting for asset transactions.
Original PR description
To reproduce: - Create an asset linear yearly. - Reevaluate it next month, while decreasing the residual amount. => The amounts don't make sense, the decrease move has been deleted. Idem for the move…
To reproduce:
- Create an asset linear yearly.
- Reevaluate it next month, while decreasing the residual amount.
=> The amounts don't make sense, the decrease move has been deleted.
Idem for the move before the reeval.
The issue is that we delete all the moves that are draft.
But if a move (like the decrease move) is created after the current day,
it is in auto-post, and so, in draft.
To correct that, we prevent their deletion and give the correct residual amount
(it is a computed non-stored field, so it has been given as an argument to the method).Another issue was found, related to already depreciated assets.
Create an asset with 10000 as original value, 4000 as Import amount
and 6000 as salvage value.
Confirm it (no moves should be created)
Sell or dispose it.
=> It creates a move before disposal while there shouldn't be any
The issue was that reevaluation didn't work with already depreciated assets and with no moves before the reevaluation.
opw-3945341
task-3444716
Forward-Port-Of: odoo/enterprise#65031
Forward-Port-Of: odoo/enterprise#62982