[FIX]t-field wrong outputs when precision is 0

This commit is contained in:
kevin wang
2014-05-26 17:06:49 +08:00
parent 576b00a196
commit 9bfa02386c
+1 -1
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