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
+ 8
8
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -82,7 +82,7 @@
self.assertEqual(self._consult_account(account), accentry.ids)
# Ask for drafts only; should now find nothing to export.
with self.assertRaises(odoo.exceptions.Warning):
with self.assertRaises(odoo.exceptions.UserError):
self._consult_account(account, transaction_state="draft")
# Close the period; we should still find our entry as closed periods
@@ -91,7 +91,7 @@
self.assertEqual(self._consult_account(account), accentry.ids)
# Ask for open periods only; should now find nothing to export.
with self.assertRaises(odoo.exceptions.Warning):
with self.assertRaises(odoo.exceptions.UserError):
self._consult_account(account, include_closed_periods=False)
def test_invoice_paid_amount(self):
@@ -105,9 +105,9 @@
# Validate the invoice.
self.assertEqual(invoice.state, "draft")
self._validateAccDoc(invoice)
invoice.refresh()
invoice.invalidate_cache()
self.assertEqual(invoice.state, "posted")
self.assertEqual(invoice.paid_amount, 0.0) # No payments so far.
# Partial payment.
self._payInvoice(invoice, 2.0)
@@ -109,11 +109,11 @@
self.assertEqual(invoice.state, "posted")
self.assertEqual(invoice.paid_amount, 0.0) # No payments so far.
# Partial payment.
self._payInvoice(invoice, 2.0)
invoice.refresh()
invoice.invalidate_cache()
self.assertEqual(invoice.paid_amount, 2.0)
self.assertEqual(invoice.state, "posted")
# Partial payment.
self._payInvoice(invoice, 4.0)
@@ -115,11 +115,11 @@
self.assertEqual(invoice.paid_amount, 2.0)
self.assertEqual(invoice.state, "posted")
# Partial payment.
self._payInvoice(invoice, 4.0)
invoice.refresh()
invoice.invalidate_cache()
self.assertEqual(invoice.paid_amount, 2.0 + 4.0)
self.assertEqual(invoice.state, "posted")
# Pay the rest.
self._payInvoice(invoice, AMOUNT - 2.0 - 4.0)
@@ -121,9 +121,9 @@
self.assertEqual(invoice.paid_amount, 2.0 + 4.0)
self.assertEqual(invoice.state, "posted")
# Pay the rest.
self._payInvoice(invoice, AMOUNT - 2.0 - 4.0)
invoice.refresh()
invoice.invalidate_cache()
self.assertEqual(invoice.paid_amount, AMOUNT)
self.assertEqual(invoice.invoice_payment_state, "paid")
Loading