odoo/openerp/addons/base/test
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
..
__init__.py [IMP] cron: added yaml test. 2011-08-09 13:10:08 +02:00
base_test.yml [FIX] base: support float rounding with rounding_method=UP (ceiling) 2014-10-22 14:28:22 +02:00
bug_lp541545.xml [IMP] openerp python module. 2011-02-07 13:57:23 +01:00
test_auth.yml [IMP] openerp python module. 2011-02-07 13:57:23 +01:00
test_context.xml [IMP] openerp python module. 2011-02-07 13:57:23 +01:00
test_ir_rule.yml [IMP] base: update ir.rule tests for new combination semantics 2011-06-01 16:39:21 +02:00
test_osv_expression.yml [FIX] expression: allow exclusion of records with translated fields 2014-01-08 16:27:22 +01:00