You have been subscribed to a public bug by Lorenzo Battistini - Agile BG - 
Domsense (elbati):

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: Low
     Assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3)
         Status: Confirmed

-- 
wrong currency rounding
https://bugs.launchpad.net/bugs/865387
You received this bug notification because you are a member of OpenERP 
Accounting Experts, which is subscribed to the bug report.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-accounting
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-expert-accounting
More help   : https://help.launchpad.net/ListHelp

Reply via email to