Skip to content

Commit

Permalink
[FIX] l10n_it_reverse_charge: disable one test (for now)
Browse files Browse the repository at this point in the history
OCA/OCB@674eaa3
apparently broke odoo.addons.account.tests.common.AccountTestInvoicingCommon
method init_invoice() when called with two opposed values as amounts
(throws odoo.exceptions.UserError: Cannot create unbalanced journal
entry)

One test (test_intra_EU_zero_total) disabled. If/when init_invoice() is
fixed, it will trigger a failure, or the test will be rewritten to adapt
to the new behaviour, whichever comes first.
  • Loading branch information
TheMule71 committed Apr 8, 2022
1 parent fd320c8 commit 0e2ade3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions l10n_it_reverse_charge/tests/test_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ def test_intra_EU_cancel_and_draft(self):
self.assertEqual(invoice.state, "draft")

def test_intra_EU_zero_total(self):

with self.assertRaises(UserError):
# this is defined in odoo.addons.account.tests.common.AccountTestInvoicingCommon
self.init_invoice(
"in_invoice",
partner=self.supplier_intraEU,
post=True,
amounts=[100, -100],
taxes=self.tax_22ai,
)

# disable the rest of the test as it depends on this NOT to fail
return

# TMP
# pylint: disable=W0101
invoice = self.create_invoice(
self.supplier_intraEU, [100, -100], taxes=self.tax_22ai
)
Expand Down

0 comments on commit 0e2ade3

Please sign in to comment.