From 7f2bd086087f73878f62933ecd2e7c2bed32142e Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Wed, 23 Aug 2017 16:31:57 +0200 Subject: [PATCH] [FIX] core: define float_utils.round also in python2 --- odoo/tools/float_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/odoo/tools/float_utils.py b/odoo/tools/float_utils.py index 8f95a43ba6fd1..33ef00a43dd64 100644 --- a/odoo/tools/float_utils.py +++ b/odoo/tools/float_utils.py @@ -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 \