Skip to content

Commit

Permalink
[FIX]l10n_be_intrastat_product fix unit tests
Browse files Browse the repository at this point in the history
Replace declaration done() by draft2confirmed() and confirmed2done()
  • Loading branch information
luc-demeyer committed May 2, 2024
1 parent 7a2e8e9 commit b979fdd
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions l10n_be_intrastat_product/tests/test_intrastat_be.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ def test_be_sale_b2b(self):
}
)
declaration.action_gather()
declaration.done()
declaration.draft2confirmed()
declaration.confirmed2done()
clines = declaration.computation_line_ids
dlines = declaration.declaration_line_ids
self.assertEqual(clines[0].vat, "NL123456782B90")
Expand Down Expand Up @@ -175,7 +176,8 @@ def test_be_sale_b2b(self):
}
)
declaration.action_gather()
declaration.done()
declaration.draft2confirmed()
declaration.confirmed2done()
clines = declaration.computation_line_ids
dlines = declaration.declaration_line_ids
self.assertEqual(clines[1].amount_company_currency, -5000.0)
Expand All @@ -202,7 +204,8 @@ def test_be_sale_b2b_na(self):
}
)
declaration.action_gather()
declaration.done()
declaration.draft2confirmed()
declaration.confirmed2done()
dlines = declaration.declaration_line_ids
self.assertEqual(dlines[0].vat, "QV999999999999")

Expand All @@ -226,7 +229,8 @@ def test_be_sale_b2c(self):
}
)
declaration.action_gather()
declaration.done()
declaration.draft2confirmed()
declaration.confirmed2done()
# clines = declaration.computation_line_ids
dlines = declaration.declaration_line_ids
self.assertEqual(dlines[0].vat, "QV999999999999")
Expand Down Expand Up @@ -265,7 +269,8 @@ def test_be_purchase(self):
}
)
declaration.action_gather()
declaration.done()
declaration.draft2confirmed()
declaration.confirmed2done()
clines = declaration.computation_line_ids
dlines = declaration.declaration_line_ids
self.assertEqual(clines[1].weight, 460.0)
Expand Down

0 comments on commit b979fdd

Please sign in to comment.