Skip to content

Commit

Permalink
[FIX] core: define float_utils.round also in python2
Browse files Browse the repository at this point in the history
  • Loading branch information
KangOl committed Aug 23, 2017
1 parent 8361ec8 commit 7f2bd08
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions odoo/tools/float_utils.py
Expand Up @@ -23,6 +23,8 @@ def round(f):
return f + math.copysign(0.5, f)
# copysign ensures round(-0.) -> -0 *and* result is a float
return math.copysign(roundf, f)
else:
round = round

def _float_check_precision(precision_digits=None, precision_rounding=None):
assert (precision_digits is not None or precision_rounding is not None) and \
Expand Down

0 comments on commit 7f2bd08

Please sign in to comment.