Merge pull request #202 from lyinfo/master-fix-zero-qweb-field

[FIX]t-field wrong outputs when precision is 0
This commit is contained in:
Martin Trigaux 2014-05-27 14:46:31 +02:00
commit 3b32464ed2
1 changed files with 1 additions and 1 deletions

View File

@ -612,7 +612,7 @@ class FloatConverter(osv.AbstractModel):
# it to switch to scientific notation starting at a million *and* to
# strip decimals. So use %f and if no precision was specified manually
# strip trailing 0.
if not precision:
if precision is None:
formatted = re.sub(r'(?:(0|\d+?)0+)$', r'\1', formatted)
return formatted