summaryrefslogtreecommitdiff
path: root/addons/account_check_printing/models
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-03-29 19:47:46 +0100
committerChristophe Simonis <chs@odoo.com>2019-03-29 19:47:46 +0100
commit28cce6ce3a42fab2b4ab185aed024850e7492a86 (patch)
tree47d9f742a4fae5e78c6ab2b9eb4ed5052f32325c /addons/account_check_printing/models
parent98e4540fe9adab8bd0d77fbff7906a5b7fbd01a3 (diff)
parentc0cf4049b2a4a7c51169ea88569fd7f89e503a59 (diff)
[MERGE] forward port branch saas-12.1 up to c0cf4049b2a
Diffstat (limited to 'addons/account_check_printing/models')
-rw-r--r--addons/account_check_printing/models/account_payment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account_check_printing/models/account_payment.py b/addons/account_check_printing/models/account_payment.py
index e52a7cbe278..d2fd855ab07 100644
--- a/addons/account_check_printing/models/account_payment.py
+++ b/addons/account_check_printing/models/account_payment.py
@@ -28,7 +28,7 @@ class AccountRegisterPayments(models.TransientModel):
def _onchange_amount(self):
if hasattr(super(AccountRegisterPayments, self), '_onchange_amount'):
super(AccountRegisterPayments, self)._onchange_amount()
- self.check_amount_in_words = self.currency_id.amount_to_text(self.amount)
+ self.check_amount_in_words = self.currency_id.amount_to_text(self.amount) if self.currency_id else False
def _prepare_payment_vals(self, invoices):
res = super(AccountRegisterPayments, self)._prepare_payment_vals(invoices)