account reconcile float calculation error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Committed
|
Medium
|
OpenERP R&D Addons Team 3 |
Bug Description
In some constellations, the manual reconciliation has an floating point bug. so it is possible to have the same value for credit and debit but the writeoff is not zero. The bug is in this file and line:
openerp/
'writeoff': debit - credit
Original code:
return {'trans_nbr': count, 'account_id': account_id, 'credit': credit, 'debit': debit, 'writeoff': debit - credit}
Quick fix:
return {'trans_nbr': count, 'account_id': account_id, 'credit': credit, 'debit': debit, 'writeoff': round(debit - credit, 4)}
Better:
Use dp.get_
Still better:
Don't use float for currency calculation ;)
OpenERP Version openerp-
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 27 lines (+3/-1)1 file modifiedaccount/wizard/account_reconcile.py (+3/-1)
tags: | added: invoicing |
Hello Stephan,
I have checked your Issue with following revision.
OE Trunk: (Build 5182)
server : 4832
addons : 8641
web : 3705
But It's working fine for me. The writeoff amount is zero while using a same amount for debit and credit. would you please check It again with latest and notify us still you have faced the same problem.
Thanks and waiting for your reply!