odoo/openerp/tools
Martin Trigaux 7705f883d2 [FIX] base: support float rounding with rounding_method=UP (ceiling)
Add rounding_method parameter on float_round method to offer
HALF-UP (default, usual round) or UP (ceiling) rounding method.
Use the second method instead of math.ceil() for product
reservations.

For UP, the python math.ceil() method uses "torwards infinity"
rounding method while we want "away from zero".
Therefore we use the absolute value of normalized_value to make
sure than -1.8 is rounded to -2.0 and not -1.

Fixes #1125 #2793

This is a cherry-pick of d4972ff which was reverted at 333852e due
to remaining issue with negative values.
2014-10-22 14:28:22 +02:00
..
__init__.py [REN] html_sanitize -> mail, to have a central file for methods about mail (html sanitizing, html management, emails related functions, ...). 2012-11-06 12:54:20 +01:00
amount_to_text.py [FIX] amount_to_text: make sure accented string is in unicode 2014-04-23 17:02:15 +02:00
amount_to_text_en.py [IMP] more augmented assignments 2012-12-14 14:44:55 +01:00
assertion_report.py [IMP] tests: 2012-03-02 12:02:27 +01:00
cache.py multiprocessing signaling manually backported from 6.1 2012-12-08 19:11:51 +01:00
config.py [FIX] configuration file dbfilter's option has no effect 2014-07-07 18:08:31 +02:00
convert.py [FIX] convert: gracefully ignore missing XML IDs when processing <delete> tags + warn in log 2014-05-05 09:46:36 +02:00
float_utils.py [FIX] base: support float rounding with rounding_method=UP (ceiling) 2014-10-22 14:28:22 +02:00
func.py [REM] unnecessary parens 2012-12-14 13:38:03 +01:00
graph.py [IMP] more augmented assignments 2012-12-14 14:44:55 +01:00
image.py [FIX] image tools: do not crop an image when resizing it, use reduce the size instead and add transparency background (opw 593992) 2014-02-12 16:51:04 +01:00
import_email.py [IMP] res_partner:add res_partner_address field to res_partner 2012-02-20 14:47:05 +05:30
lru.py [IMP] compare to None by identity 2012-12-14 13:16:38 +01:00
mail.py [IMP] mail: parsing emails with several html parts 2014-10-09 13:53:23 +02:00
misc.py [ADD] Macedonian language 2014-05-18 22:57:07 +02:00
osutil.py merge upstream 2012-12-17 18:26:14 +01:00
parse_version.py [IMP] Added missing vim mode lines 2011-11-22 09:58:48 +01:00
pdf_utils.py [IMP] openerp python module. 2011-02-07 13:57:23 +01:00
safe_eval.py [FIX] tools: remove useless attributes 2014-09-29 17:39:01 +02:00
sql.py [FIX] drop_view_if_exists: simpler and CASCADING implementation for pg 8.3+ 2012-02-27 17:57:37 +01:00
test-config-values [ADD] tools/config: started tests. 2011-06-01 13:50:55 +02:00
test-config-values-00.conf [ADD] tools/config: started tests. 2011-06-01 13:50:55 +02:00
test_config.py [IMP] Added missing vim mode lines 2011-11-22 09:58:48 +01:00
test_reports.py [FIX] test_reports.py: use communicate() to avoid creating zombie processes 2012-11-30 16:29:37 +01:00
translate.py [FIX] base: python 2.6 incompatibility for dictionary comprehension 2014-08-20 10:28:37 +02:00
view_validation.py [FIX]:Fix a predicate function doc 2012-08-07 12:24:55 +05:30
which.py [IMP] Added missing vim mode lines 2011-11-22 09:58:48 +01:00
win32.py [IMP] openerp python module. 2011-02-07 13:57:23 +01:00
yaml_import.py [FIX] yaml tests: Set on_change keys not in view logger as debug instead of warning 2014-08-11 11:11:36 +02:00
yaml_tag.py [FIX] yaml: more explicit error if !record has missing parameters 2012-10-29 18:34:21 +01:00