[FIX] product,float_utils: perform ceiling via float_round with new rounding_method UP
authorCedric Snauwaert <csn@openerp.com>
Tue, 23 Sep 2014 15:39:14 +0000 (17:39 +0200)
committerOlivier Dony <odo@openerp.com>
Wed, 24 Sep 2014 15:11:25 +0000 (17:11 +0200)
commitd4972ffdb6b9356a524eef1dbc11f455ff4473f2
tree157ec0170efdd29fb0da369dcaf2a32a8673f762
parent1933e926ff7457b6f116296190ec55eb908de9b3
[FIX] product,float_utils: perform ceiling via float_round with new rounding_method UP

Modified product ceiling() to use float_round() with special mode
for rounding UP (away from zero), avoiding pathological cases where
float representations errors were ceiling to the superior unit.

Also added correspding tests for rounding_method=UP

Fixes issue #1125, and replaces PR #1126.
addons/product/_common.py
openerp/addons/base/test/base_test.yml
openerp/tools/float_utils.py