[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:
parent
396181648c
commit
c054350dac
|
@ -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])
|
||||
|
||||
|
|
Loading…
Reference in New Issue