[FIX] product: _compute_qty: first round before ceiling, to avoid pathological cases
authorCedric Snauwaert <csn@openerp.com>
Wed, 24 Sep 2014 14:09:28 +0000 (16:09 +0200)
committerOlivier Dony <odo@openerp.com>
Wed, 24 Sep 2014 15:11:26 +0000 (17:11 +0200)
commit311c77bb885d815aeb64ac5e89d3665f4c2dd172
treea2ab60ae6592e9e600517655662bfd8738f3fa4d
parentd4972ffdb6b9356a524eef1dbc11f455ff4473f2
[FIX] product: _compute_qty: first round before ceiling, to avoid pathological cases

Fixes problem when we try to sell 12 units of a product and change it to 1 dozen,
the algorithm was then trying to recompute the original amount and was getting
12,0000048 as a result which was then passed to the ceiling method, getting 13.0!

See also previous commit and issue #1125, PR #1126
addons/product/product.py