diff options
| author | fw-bot <otis@odoo.com> | 2020-09-15 10:39:19 +0000 |
|---|---|---|
| committer | oco-odoo <oco@odoo.com> | 2020-09-18 15:44:52 +0000 |
| commit | 5d00592f7d803888d8d5befd5a8cd1b096067860 (patch) | |
| tree | ae704281d98712d57b58e3ac46b0053190f0f840 /addons/account_debit_note | |
| parent | ecc8f8be6ee09cb0fdfae0c4b35a933541d41292 (diff) | |
[FIX] account: allow full reconciliation for tax lines on entries mixing cash basis and regular taxes
Solves https://github.com/odoo/odoo/issues/56803
Use case:
1) Create accounts ACC TAX A, ACC TAX B, with reconcile = True, internal_type = other
2) Create Tax A, with tax_exigibilty = on_invoice and account_id = ACC TAX A, 20%
3) Create Tax B, with tax_exigibilty = on_payment and account_id = ACC TAX B and cash_basic_account_id = ACC TAX A, 20%
4) Create invoice A, account_id = Tax A, unit_price = 1000, Valide invoice
5) Create invoice B, account_id = Tax B, unit_price = 500, Valide invoice,
6) Register full payment for invoice B. The cash basis tax creates a miscellaneous operation MISC A, containing a line on ACC TAX A.
7) Create a mis operation MISC TVA, like this:
line 1 : account_id = ACC TAX A, credit = 300
line 2 : account_id = 401100, debit = 300
8) Reconcile the following move lines:
line of MISC A with account ACC TAX A (300)
line of invoice A with account ACC TAX A (200)
line of MISC TVA with account ACC TAX A (100)
==> When doing that, not full reconcile object was created between the reconciled lines, while it should have been.
X-original-commit: ff35a49
[IMP] account: reintroduce a test that should have been forward-ported …
This test was made together with a bugfix by https://github.com/odoo/odoo/pull/51529 . The fix did not need to be forward-ported to 13.0, but the test should have been, so that we are sure it does not break again in the future.
closes odoo/odoo#58051
X-original-commit: cbf2c1bc959b87ed2af7ca86202394e9520d177c
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/account_debit_note')
| -rw-r--r-- | addons/account_debit_note/tests/test_out_debit_note.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account_debit_note/tests/test_out_debit_note.py b/addons/account_debit_note/tests/test_out_debit_note.py index dd024fa23b0..64746236b67 100644 --- a/addons/account_debit_note/tests/test_out_debit_note.py +++ b/addons/account_debit_note/tests/test_out_debit_note.py @@ -9,7 +9,7 @@ class TestAccountDebitNote(AccountTestInvoicingCommon): def test_00_debit_note_out_invoice(self): """ Debit Note of a regular Customer Invoice""" - invoice = self.init_invoice('out_invoice') + invoice = self.init_invoice('out_invoice', products=self.product_a+self.product_b) invoice.action_post() move_debit_note_wiz = self.env['account.debit.note'].with_context(active_model="account.move", active_ids=invoice.ids).create({ @@ -28,7 +28,7 @@ class TestAccountDebitNote(AccountTestInvoicingCommon): def test_10_debit_note_in_refund(self): """ Debit Note of a vendor refund (is a regular vendor bill) """ - invoice = self.init_invoice('in_refund') + invoice = self.init_invoice('in_refund', products=self.product_a+self.product_b) invoice.action_post() move_debit_note_wiz = self.env['account.debit.note'].with_context(active_model="account.move", active_ids=invoice.ids).create({ |
