[FIX] amount_to_text: avoid to have a none in the concat
bzr revid: stw@openerp.com-20120904100250-utk61q7ik41lameo
This commit is contained in:
parent
76772d06bf
commit
29b437766f
|
@ -88,8 +88,8 @@ def amount_to_text(number, currency):
|
|||
end_word = english_number(int(list[1]))
|
||||
cents_number = int(list[1])
|
||||
cents_name = (cents_number > 1) and 'Cents' or 'Cent'
|
||||
final_result = start_word +' '+units_name+' and ' + end_word +' '+cents_name
|
||||
return final_result
|
||||
|
||||
return ' '.join(filter(None, [start_word, units_name, (start_word or units_name) and (end_word or cents_name) and 'and', end_word, cents_name]))
|
||||
|
||||
|
||||
#-------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue