Skip to content
Snippets Groups Projects
Commit ef9e2d9f authored by oco-odoo's avatar oco-odoo
Browse files

[FIX] account: proper tax repartition for tax lines when using a writeoff...

[FIX] account: proper tax repartition for tax lines when using a writeoff reconciliation model with taxes

When creating the results of a writeoff button for the manual reconciliation widget, debit and credit are actually inverted with regards to what will actually get created (final inversion is then done here to bring them back to the right sign: https://github.com/odoo/enterprise/blob/15.0/account_accountant/models/reconciliation_widget.py#L986

). Because of that, the conditions defining whether or not the compute_all should compute refund repartition need to be inverted as well.

Note that it wasn't the case for bank reconciliation widget, for which the sign was directly right.

Before that, compute_tax_tag_invert computed a different value for the tax_tag_invert field on base and tax line (as the tax line uses the repartition type of tax_repartition_line_id, and the base line depends on debit/credit and the tax type). Hence, the tax_tag_invert values between those two lines where inconsistent, and the tax report was wrong (since we did * -1 on one of them, but not the other).

OPW 2769586

closes odoo/odoo#86870

X-original-commit: fdf448ef
Signed-off-by: default avatarLaurent Smet <las@odoo.com>
parent 2f4ac2a0
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment