odoo/addons/web
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
..
controllers [FIX] web: current transaction is aborted 2015-10-13 17:12:34 +02:00
doc [FIX] Use local copies of png instead of fetching them from websites 2015-01-23 11:23:04 +01:00
i18n [I18N] Update translation terms from Transifex 2015-11-01 03:03:27 +01:00
static [FIX] web: Python-like rounding method 2015-11-04 13:14:59 +01:00
tests [FIX] web: re-enable test_menu.py without the mock-menu test 2014-10-10 18:12:59 +02:00
views [FIX] web: do not crash when select wrong db 2015-06-09 15:05:57 +02:00
.bowerrc [IMP] now uses bower for some libs 2013-07-31 15:17:31 +02:00
Gruntfile.js [IMP] Added compass compilation to grunt file 2013-07-31 12:20:37 +02:00
__init__.py [FIX] web: no need to initialize wsgi handler in postload anymore 2014-03-24 10:30:38 +01:00
__openerp__.py [MERGE] Forward-port latest saas-3 bugfixes, up to c9b690f6b6 2015-01-29 13:54:13 +01:00
bower.json bowered qweb 2013-07-31 15:55:31 +02:00
package.json [IMP] Added compass compilation to grunt file 2013-07-31 12:20:37 +02:00