odoo/openerp/addons
Martin Trigaux 7705f883d2 [FIX] base: support float rounding with rounding_method=UP (ceiling)
Add rounding_method parameter on float_round method to offer
HALF-UP (default, usual round) or UP (ceiling) rounding method.
Use the second method instead of math.ceil() for product
reservations.

For UP, the python math.ceil() method uses "torwards infinity"
rounding method while we want "away from zero".
Therefore we use the absolute value of normalized_value to make
sure than -1.8 is rounded to -2.0 and not -1.

Fixes #1125 #2793

This is a cherry-pick of d4972ff which was reverted at 333852e due
to remaining issue with negative values.
2014-10-22 14:28:22 +02:00
..
base [FIX] base: support float rounding with rounding_method=UP (ceiling) 2014-10-22 14:28:22 +02:00
__init__.py [IMP] openerp.addons: openerp.addons is used instead of 2012-01-09 13:41:20 +01:00
base_quality_interrogation.py [IMP] clean permissions and shebang in files 2013-05-14 12:33:33 +02:00