[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
This commit is contained in:
Martin Trigaux 2015-11-16 12:10:20 +01:00
parent 396181648c
commit c054350dac
1 changed files with 1 additions and 1 deletions

View File

@ -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])