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
1 file
+ 3
6
Compare changes
  • Side-by-side
  • Inline
@@ -26,6 +26,7 @@
# Default amount set on accounting documents.
AMOUNT = 42.0
TAX_INCLUSIVE_AMOUNT = 48.3 # 15 % of taxes
@odoo.tests.tagged("-at_install", "post_install")
@@ -122,5 +123,5 @@
self.assertEqual(invoice.state, "posted")
# Pay the rest.
self._payInvoice(invoice, AMOUNT - 2.0 - 4.0)
self._payInvoice(invoice, TAX_INCLUSIVE_AMOUNT - 2.0 - 4.0)
invoice.invalidate_model()
@@ -126,9 +127,5 @@
invoice.invalidate_model()
import logging
log = logging.getLogger(__name__)
log.critical((invoice.amount_total, invoice.amount_residual, invoice.currency_id.is_zero(invoice.amount_residual)))
self.assertEqual(invoice.paid_amount, AMOUNT)
self.assertAlmostEqual(invoice.paid_amount, TAX_INCLUSIVE_AMOUNT, places=2)
self.assertEqual(invoice.payment_state, "paid")
def _consult_account(self, account, **kwargs):
Loading