Merge lp:~openerp-dev/openobject-server/6.0-opw-18123-Lorenzo_Battistini into lp:openobject-server/6.0
Proposed by
Amit Dodiya (OpenERP)
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Xavier ALT | ||||
Proposed branch: | lp:~openerp-dev/openobject-server/6.0-opw-18123-Lorenzo_Battistini | ||||
Merge into: | lp:openobject-server/6.0 | ||||
Diff against target: |
20 lines (+2/-1) 1 file modified
bin/addons/base/res/res_currency.py (+2/-1) |
||||
To merge this branch: | bzr merge lp:~openerp-dev/openobject-server/6.0-opw-18123-Lorenzo_Battistini | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Olivier Dony (Odoo) | Disapprove | ||
Lorenzo Battistini (community) | Needs Fixing | ||
Vo Minh Thu | Pending | ||
Review via email: mp+79087@code.launchpad.net |
Description of the change
Hello,
[FIX]:wrong currency rounding : case(18123)
thanks,
Amit
To post a comment you must log in.
Unmerged revisions
- 3529. By Amit Dodiya (OpenERP)
-
[FIX]:wrong currency rounding
I just realized that the form
round(amount / currency.rounding) * currency.rounding
is also used to allow a generic 'currency. rounding' .
For instance, I could want to allow the following amounts:
0.00 - 0.05 - 0.10 - 0.15 ...
avoiding 0.01 - 0.02 - 0.03 ...
so I would have to set currency.rounding = 0.05
Because of that, maybe we can use something like this:
float(Decimal( str(round( amount / currency.rounding) * currency. rounding) ).quantize( Decimal( str(currency. rounding) ), rounding= ROUND_HALF_ UP))