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

[FIX] account: cash basis taxis: allow full reconciliation of tax lines on...

[FIX] account: cash basis taxis: allow full reconciliation of tax lines on cash basis final account without full payment of the invoice

To reproduce the issue before this fix:

1. Create accounts ACC TAX A, ACC TAX B, with reconcile = True, internal_type = other

2. Create Tax B, with tax_exigibilty = on_payment and account_id = ACC TAX B and cash_basic_account_id = ACC TAX A, 20%

3. Create invoice B, account_id = Tax B, unit_price = 1000, Valide invoice,

4. Register a payment of 600 for invoice B (so, that's half the invoice, when including the taxes). The cash basis tax creates a miscellaneous operation MISC A, containing a line on ACC TAX A.

5. Create a mis operation MISC TVA, like this:
line 1 : account_id = ACC TAX A, credit = 100
line 2 : account_id = 401100, debit = 100

6. Reconcile the following move lines:
line of MISC A with account ACC TAX A (100)
line of MISC TVA with account ACC TAX A (100)

==> The lines should be fully reconciled

To solve that without breaking the fix made here https://github.com/odoo/odoo/commit/c43acc34b873dc70cf792675fe1d58d8b0e116b1 , we rely on the tax_exigible field of account move lines. When all the reconcile lines are exigible, it means we're not reconciling the transition line of a cash basis entry, and so we can directly full reconcile.

Fixes https://github.com/odoo/odoo/issues/58996
OPW 2350494

X-original-commit: b8ab3c78ff9354091f5154bb03a716c32a609de2
parent 1e742457
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment