Skip to content
Snippets Groups Projects
Commit 3b32464e authored by Martin Trigaux's avatar Martin Trigaux
Browse files

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

[FIX]t-field wrong outputs when precision is 0
parents b5a7156f 9bfa0238
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment