odoo/addons/web/static/src
Nicolas Martinelli ea2c80cad0 [FIX] web: Python-like rounding method
Javascript and Python handle the rounding of -x.5 differently.

In JS, `Math.round(-0.5)` is equal to `-0`.
In Python, `round(-0.5)` is equal to `-1`.

This will lead to inconsistencies between Python and Javascript, but it
can also lead to inconsistencies in the Javascript itself. Indeed, in
the POS, a refund to the client is entered as a negative number. For
example, `4.245` will be rounded to `4.25`, but a refund of `-4.245`
will be rounded to `-4.24`. The payment and the refund are not
consistent.

Sources:
- http://www.ecma-international.org/ecma-262/6.0/index.html#sec-math.round
- https://docs.python.org/2/library/functions.html#round
- https://en.wikipedia.org/wiki/Rounding#Round_half_up

Fixes #9249
opw-653034
2015-11-04 13:14:59 +01:00
..
css [FIX] web: css for popup search view float position 2015-09-14 12:15:10 +02:00
font [FIX] File permission: remove unnecessary executable perm on files 2015-01-23 11:11:27 +01:00
img [FIX] Use local copies of png instead of fetching them from websites 2015-01-23 11:23:04 +01:00
js [FIX] web: Python-like rounding method 2015-11-04 13:14:59 +01:00
xml [MERGE] forward port of branch 7.0 up to 1c0bc7c 2015-06-30 12:47:27 +02:00