Skip to content
Snippets Groups Projects

Draft: Port to Odoo 16.

Closed Etienne Ferriere requested to merge topic/13.0/MO16-236 into branch/13.0
Compare and Show latest version
2 files
+ 13
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -26,7 +26,6 @@
# Default amount set on accounting documents.
AMOUNT = 42.0
TAX_INCLUSIVE_AMOUNT = 48.3 # 15 % of taxes
@odoo.tests.tagged("-at_install", "post_install")
@@ -39,8 +38,8 @@
super().setUp()
self.sales_journal = self.env["account.journal"].search(
[("type", "=", "sale")], limit=1
[("type", "=", "sale"), ("company_id", "=", self.env.company.id)], limit=1
)
self.assertTrue(self.sales_journal)
self.pay_journal = self.env["account.journal"].search(
@@ -43,8 +42,8 @@
)
self.assertTrue(self.sales_journal)
self.pay_journal = self.env["account.journal"].search(
[("type", "=", "bank")], limit=1
[("type", "=", "bank"), ("company_id", "=", self.env.company.id)], limit=1
)
self.assertTrue(self.pay_journal)
@@ -123,5 +122,5 @@
self.assertEqual(invoice.state, "posted")
# Pay the rest.
self._payInvoice(invoice, TAX_INCLUSIVE_AMOUNT - 2.0 - 4.0)
self._payInvoice(invoice, invoice.amount_total - 2.0 - 4.0)
invoice.invalidate_model()
@@ -127,5 +126,5 @@
invoice.invalidate_model()
self.assertAlmostEqual(invoice.paid_amount, TAX_INCLUSIVE_AMOUNT, places=2)
self.assertAlmostEqual(invoice.paid_amount, invoice.amount_total, places=2)
self.assertEqual(invoice.payment_state, "paid")
def _consult_account(self, account, **kwargs):
@@ -325,7 +324,6 @@
# Create an account.period
a_period = self.env["account.period"].create(
{
"code": "FY" + time.strftime("%Y"),
"name": "Fiscal Year X " + time.strftime("%Y"),
"fiscalyear_id": a_fiscalyear.id,
"date_start": time.strftime("%Y") + "-01-01",
Loading