[FIX] tools: do not display False as the currency

The field symbol is not required on a res.currency (it should and will be
changed in master). In case it is not set, do not display the currency in the
rapport.

Fixes #11346
This commit is contained in:
Martin Trigaux
2016-08-03 14:23:11 +02:00
parent 1cca5dea13
commit 04b081ab37
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -223,7 +223,7 @@ class rml_parse(object):
return date.strftime(date_format.encode('utf-8'))
res = self.lang_dict['lang_obj'].format('%.' + str(digits) + 'f', value, grouping=grouping, monetary=monetary)
if currency_obj:
if currency_obj and currency_obj.symbol:
if currency_obj.position == 'after':
res = u'%s\N{NO-BREAK SPACE}%s' % (res, currency_obj.symbol)
elif currency_obj and currency_obj.position == 'before':
+1 -1
View File
@@ -1168,7 +1168,7 @@ def formatLang(env, value, digits=None, grouping=True, monetary=False, dp=False,
res = lang_obj.format('%.' + str(digits) + 'f', value, grouping=grouping, monetary=monetary)
if currency_obj:
if currency_obj and currency_obj.symbol:
if currency_obj.position == 'after':
res = '%s %s' % (res, currency_obj.symbol)
elif currency_obj and currency_obj.position == 'before':