[FIX] report: allow using 0 decimal precision in rml reports

This commit is contained in:
Denis Ledoux 2014-08-07 14:50:14 +02:00
parent ed79bc203f
commit ea05a21938
1 changed files with 3 additions and 1 deletions

View File

@ -265,7 +265,9 @@ class rml_parse(object):
elif (hasattr(obj, '_field') and\
isinstance(obj._field, (float_field, function_field)) and\
obj._field.digits):
d = obj._field.digits[1] or DEFAULT_DIGITS
d = obj._field.digits[1]
if not d and d is not 0:
d = DEFAULT_DIGITS
return d
def formatLang(self, value, digits=None, date=False, date_time=False, grouping=True, monetary=False, dp=False, currency_obj=False):