Skip to content

Commit

Permalink
[COV] l10n_it_fatturapa_in: Do not depend on previous tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SirAionTech committed Aug 6, 2024
1 parent 10cfb55 commit 6934f6d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<DatiAnagrafici>
<IdFiscaleIVA>
<IdPaese>IT</IdPaese>
<IdCodice>02780790107</IdCodice>
<IdCodice>39768960237</IdCodice>
</IdFiscaleIVA>
<Anagrafica>
<Denominazione>SOCIETA' ALPHA SRL</Denominazione>
Expand Down
13 changes: 9 additions & 4 deletions l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1185,13 +1185,18 @@ def test_01_xml_zero_quantity_line(self):

def test_xml_import_summary_tax_rate(self):
# Invoice with positive total. Detail Level: '1' -- Tax Rate
# Note: this test depends on test_14_xml_import for supplier creation
supplier = self.env["res.partner"].search([("vat", "=", "IT02780790107")])[0]
# in order to make the system create the invoice lines
supplier.e_invoice_detail_level = "1"
supplier = self.env["res.partner"].create(
{
"name": "SOCIETA' ALPHA SRL",
"vat": "IT39768960237",
# in order to make the system create the invoice lines
"e_invoice_detail_level": "1",
}
)
res = self.run_wizard("test_summary_tax_rate", "IT05979361218_ripilogoiva.xml")
invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.partner_id, supplier)
self.assertEqual(invoice.amount_total, 204.16)
self.assertEqual(len(invoice.invoice_line_ids), 2)

Expand Down

0 comments on commit 6934f6d

Please sign in to comment.