summaryrefslogtreecommitdiff
path: root/addons/account_check_printing/models
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-08-27 16:06:01 +0200
committerChristophe Simonis <chs@odoo.com>2019-08-27 16:06:01 +0200
commit838b3f2d827daa1d1fb945de34345c7f9ca4f1b0 (patch)
treedc83ea0600959ebeaf50d752d9cfa78c2c51a6f0 /addons/account_check_printing/models
parent4833aeb960fdf72bbb55721c3e2f4c83b27d2cbd (diff)
parent1385b60004dde5e2b1738161280d979f60cc0418 (diff)
[MERGE] forward port branch 11.0 up to 1385b60004d
Diffstat (limited to 'addons/account_check_printing/models')
-rw-r--r--addons/account_check_printing/models/account_payment.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/account_check_printing/models/account_payment.py b/addons/account_check_printing/models/account_payment.py
index 28e9f285c1d..235bf96b52b 100644
--- a/addons/account_check_printing/models/account_payment.py
+++ b/addons/account_check_printing/models/account_payment.py
@@ -115,6 +115,11 @@ class AccountPayment(models.Model):
""" This method is a hook for l10n_xx_check_printing modules to implement actual check printing capabilities """
raise UserError(_("You have to choose a check layout. For this, go in Apps, search for 'Checks layout' and install one."))
+
+ def set_check_amount_in_words(self):
+ for payment in self:
+ payment.check_amount_in_words = payment.currency_id.amount_to_text(payment.amount) if payment.currency_id else ''
+
#######################
#CHECK PRINTING METHODS
#######################