c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #33828
[Bug 865387] [NEW] wrong currency rounding
Public bug reported:
openobject-addons/6.0 revno 4863
Steps:
- Configure 'account' module using EUR currency
- Configure a bank journal for USD currency
- Create a new rate for USD currency, with date 2011-10-01
- Create a new invoice, with date 2011-09-01, selecting USD currency and inserting one line of 3638.97 amount
- Pay the invoice selecting 'Reconcile with Write-Off' (with today's date)
The write.off entry is not created (it should be produced by the different currency rates).
This is because of line 88 of base/res/res_currency.py :
round(amount / currency.rounding) * currency.rounding
3638.9700000000003
and this makes false the line 719 of account_voucher.py (line.amount ==
line.amount_unreconciled)
I think the line
return round(amount / currency.rounding) * currency.rounding
should be replaced by something like
float(Decimal(str(amount)).quantize(Decimal(str(currency.rounding)),
rounding=ROUND_HALF_UP))
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/865387
Title:
wrong currency rounding
Status in OpenERP Addons (modules):
New
Bug description:
openobject-addons/6.0 revno 4863
Steps:
- Configure 'account' module using EUR currency
- Configure a bank journal for USD currency
- Create a new rate for USD currency, with date 2011-10-01
- Create a new invoice, with date 2011-09-01, selecting USD currency and inserting one line of 3638.97 amount
- Pay the invoice selecting 'Reconcile with Write-Off' (with today's date)
The write.off entry is not created (it should be produced by the different currency rates).
This is because of line 88 of base/res/res_currency.py :
round(amount / currency.rounding) * currency.rounding
3638.9700000000003
and this makes false the line 719 of account_voucher.py (line.amount
== line.amount_unreconciled)
I think the line
return round(amount / currency.rounding) * currency.rounding
should be replaced by something like
float(Decimal(str(amount)).quantize(Decimal(str(currency.rounding)),
rounding=ROUND_HALF_UP))
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/865387/+subscriptions
Follow ups
-
[Bug 865387] Re: wrong currency rounding
From: Ferdinand @ Camptocamp, 2011-11-12
-
[Bug 865387] Re: wrong currency rounding
From: Lorenzo Battistini - Agile BG - Domsense, 2011-11-12
-
[Bug 865387] Re: wrong currency rounding
From: Amit Dodiya (OpenERP), 2011-11-11
-
[Bug 865387] Re: wrong currency rounding
From: Amit Dodiya (OpenERP), 2011-11-11
-
[Bug 865387] Re: wrong currency rounding
From: Priyesh (OpenERP), 2011-11-10
-
[Bug 865387] Re: wrong currency rounding
From: Ferdinand @ Camptocamp, 2011-11-06
-
[Bug 865387] Re: wrong currency rounding
From: Lorenzo Battistini - Agile BG - Domsense, 2011-11-06
-
[Bug 865387] Re: wrong currency rounding
From: Lorenzo Battistini - Agile BG - Domsense, 2011-11-04
-
[Bug 865387] Re: wrong currency rounding
From: Olivier Dony (OpenERP), 2011-11-04
-
[Bug 865387] Re: wrong currency rounding
From: Amit Dodiya (OpenERP), 2011-10-12
-
[Bug 865387] Re: wrong currency rounding
From: Amit Parik (OpenERP), 2011-10-07
-
[Bug 865387] Re: wrong currency rounding
From: Lorenzo Battistini - Agile BG - Domsense, 2011-10-05
-
[Bug 865387] Re: wrong currency rounding
From: Amit Parik (OpenERP), 2011-10-05
-
[Bug 865387] Re: wrong currency rounding
From: Amit Parik (OpenERP), 2011-10-05
-
[Bug 865387] [NEW] wrong currency rounding
From: Lorenzo Battistini - Agile BG - Domsense, 2011-10-03
References