From c054350daccf82cebac2b1dca8baedf5d09582bf Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 16 Nov 2015 12:10:20 +0100 Subject: [PATCH] [FIX] account_check_writing: undefined amount In check_writing report, amount is the content of the field amount_to_text that we can not guarantee has been filled (done in onchange so could be avoided, also for other languages, etc.) Instead of potentially failing, double check amount is filled. cf https://www.odoo.com/groups/59/14976615 --- addons/account_check_writing/report/check_print.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_check_writing/report/check_print.py b/addons/account_check_writing/report/check_print.py index be5feb4662b..af5097cc5ad 100644 --- a/addons/account_check_writing/report/check_print.py +++ b/addons/account_check_writing/report/check_print.py @@ -36,7 +36,7 @@ class report_print_check(report_sxw.rml_parse): }) def fill_stars(self, amount): - if len(amount) < 100: + if amount and len(amount) < 100: stars = 100 - len(amount) return ' '.join([amount,'*'*stars])