Merge lp:~openerp-dev/openobject-addons/trunk-bug-1158359-avo into lp:openobject-addons

Proposed by Amit Vora(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1158359-avo
Merge into: lp:openobject-addons
Diff against target: 27 lines (+3/-1)
1 file modified
account/wizard/account_reconcile.py (+3/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1158359-avo
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+200055@code.launchpad.net

Description of the change

Hello,
       I have fixed account reconcile float calculation error issue using float_round method.
Thanks.
avo

To post a comment you must log in.

Unmerged revisions

9029. By Amit Vora(OpenERP)

[IMP] improve code

9028. By Amit Vora(OpenERP)

[FIX] use float_round method

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/wizard/account_reconcile.py'
2--- account/wizard/account_reconcile.py 2013-10-27 12:31:04 +0000
3+++ account/wizard/account_reconcile.py 2013-12-26 09:50:58 +0000
4@@ -24,6 +24,7 @@
5 from openerp.osv import fields, osv
6 from openerp.tools.translate import _
7 import openerp.addons.decimal_precision as dp
8+from openerp.tools.float_utils import float_round
9
10 class account_move_line_reconcile(osv.osv_memory):
11 """
12@@ -58,13 +59,14 @@
13 credit = debit = 0
14 account_id = False
15 count = 0
16+ precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
17 for line in account_move_line_obj.browse(cr, uid, context['active_ids'], context=context):
18 if not line.reconcile_id and not line.reconcile_id.id:
19 count += 1
20 credit += line.credit
21 debit += line.debit
22 account_id = line.account_id.id
23- return {'trans_nbr': count, 'account_id': account_id, 'credit': credit, 'debit': debit, 'writeoff': debit - credit}
24+ return {'trans_nbr': count, 'account_id': account_id, 'credit': credit, 'debit': debit, 'writeoff': float_round(debit-credit, precision)}
25
26 def trans_rec_addendum_writeoff(self, cr, uid, ids, context=None):
27 return self.pool.get('account.move.line.reconcile.writeoff').trans_rec_addendum(cr, uid, ids, context)

Subscribers

People subscribed via source and target branches

to all changes: