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
+ 5
8
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")
@@ -112,10 +113,6 @@
# Partial payment.
self._payInvoice(invoice, 2.0)
invoice.invalidate_model()
import logging
log = logging.getLogger(__name__)
log.critical((invoice.amount_total, invoice.amount_residual))
self.assertEqual(invoice.paid_amount, 2.0)
self.assertEqual(invoice.state, "posted")
@@ -126,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()
@@ -130,6 +127,6 @@
invoice.invalidate_model()
self.assertEqual(invoice.paid_amount, AMOUNT)
self.assertEqual(invoice.invoice_payment_state, "paid")
self.assertAlmostEqual(invoice.paid_amount, TAX_INCLUSIVE_AMOUNT, places=2)
self.assertEqual(invoice.payment_state, "paid")
def _consult_account(self, account, **kwargs):
"""Consult the specified account; return extracted accounting entries.
@@ -273,7 +270,7 @@
active_ids=acc_entry_to_pay.ids,
)
wizard = wizard_obj.create({})
wizard = wizard_obj.create({"amount": amount_to_pay})
wizard.action_create_payments()
return True
Loading