summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function/analytic_user_function_view.xml
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2015-03-09 11:46:36 +0100
committerDenis Ledoux <dle@odoo.com>2015-03-09 11:49:41 +0100
commitd93c4bef1daa61a54a0305203bf8f7de950b835d (patch)
treef2ad6b2e709ee2877767f2030b0692f0fed5dda2 /addons/analytic_user_function/analytic_user_function_view.xml
parent8bc89de4d6489c2d94c6ba9beff5b30a09f45503 (diff)
[FIX] mrp: always use float_compare to compare floats
When comparing a float value to 0.0, it can happen the float value is very near to 0.0, but not exactly 0. This is the point to use float_compare, ```float_compare(qty, 0, self.pool['decimal.precision'].precision_get(cr, uid, 'Product Unit of Measure'))ยดยดยด will compare qty to 0, with the product unit of measure precision (0.01 by default). So, if qty is equal to 0.00001, this means the qty is regarded as equal to 0.0. (float_compare will return 1).
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function_view.xml')
0 files changed, 0 insertions, 0 deletions