[FIX] base: QWeb monetary field rounding
authorGoffin Simon <simon.goffin@outlook.com>
Thu, 13 Nov 2014 14:33:26 +0000 (15:33 +0100)
committerMartin Trigaux <mat@odoo.com>
Fri, 28 Nov 2014 14:00:59 +0000 (15:00 +0100)
commitae294f6222e45cfa1442c14cdc4dee06dc8297b2
tree1075540cbf18db39b6aa906fe7b6b130ed4e66e8
parent3078cfbbd1f601788c3adbc0761204b9b164578e
[FIX] base: QWeb monetary field rounding

QWeb monetary widget uses the precision of the currency to know the number of
digits to display on a price. The number of digits is based on log10(rounding).
For currency with rounding different than 10^x (e.g. in Switzerland 0.05
to allow 5 cents coins only), the number of displayed digits should be rounded
up. e.g. log10(0.05) is -1.3, rounded up to 2 digits.

Fixes #3233
openerp/addons/base/ir/ir_qweb.py