Daily updates from Odoo
Friday, July 19, 2024
2 changes
Resolved issues and error corrections
This fix corrects a calculation error that occurred when processing down payment invoices in Mexico's CFDI system. When a 90% down payment was applied to an invoice, the system incorrectly calculated negative base amounts on invoice lines, causing CFDI validation to fail. The fix ensures that discount amounts from down payments are properly distributed across invoice lines with accurate calculations.
Original PR description
**Steps to reproduce:** - Install Accounting, Sales, l10n_mx_edi - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Create a SO: * Customer: [a Mexican customer] (e.g. INMOBILIARIA CVA) *…
**Steps to reproduce:**
- Install Accounting, Sales, l10n_mx_edi
- Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE)
- Create a SO:
* Customer: [a Mexican customer] (e.g. INMOBILIARIA CVA)
* Order Lines:
Product | Quantity | Unit Price | Taxes
---------------|----------------|----------------|----------
Product A | 1.00 | 1000.00 | 16%
Product B | 1.00 | 1500.00 | 16%
Product C | 1.00 | 3000.00 | 16%
- Confirm the SO
- Create a 90% down payment
- Confirm down payment and generate CFDI via "Send & Print" button
- Create a regular invoice for the remaining amount
- Confirm the invoice and generate CFDI
**Issue:**
The verification of the CDFI fails because there is one line with a negative base amount.
**Cause:**
The down payment line has a negative amount.
This negative amount is dispatched between the other lines and the "base" and "importe" values of these other lines are recomputed depending on the amount that is deducted from it.
However, the computation is based on a ratio computed from the price subtotal of the negative line, but the ratio is then applied to the remaining "base" amount of the negative line, which decreases for each deducted line.
This generates incorrect values in "transferred_values_list" field for the the second line and the following ones on which some amount is dispatched.
The issue only happens on the last line on which some amount has been dispatched because it receives the remaining amount that is too high due to the values deducted by the other lines being lower than what it should has been.
**Solution:**
The ratio should be computed from the remaining "base" amount of the negative line.
opw-4033979Fixed incorrect calculation formulas in Austrian financial reports that were broken during a previous code refactoring. The formulas now correctly match the verified calculations from the previous stable version, ensuring accurate tax reporting for Austrian accounting customers who work with tax lawyers and auditors.
Original PR description
After finally checking with a full-fledged accounting customer which is verified by tax lawyers and auditors these changes are needed to show the exact same result as left behind battle tested in `15.0` - `PCVIII` is a sum of `PCVIII3` + `PCVIII4` and those can be part of `PCVIII1` or `PCVIII2` This needs also be reflected in `ABII4` if the balance needs to be mirrored. Actually it should be similar presented in `ABII4`, but was not yet done. This might need some account tags to be adapted in Odoo Community `l10n_at` CoA, but let's start from here as it is secured and tested information. Info: @wt-io-it