Merge lp:~openerp-dev/openobject-addons/6.1-opw-579984-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-579984-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
account/account.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-579984-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+128009@code.launchpad.net

Description of the change

Hello Sir,

[FIX]account: key error credit/debit, when editing the already created journal item from the journal entries menu.

Backported from the trunk addons revision:7365
Steps:
1. Create Journal Items from the Journal Entries menu.
2. Try to edit the created line.
You will get error, KeyError: 'credit'

Kindly review the branch and share your views on it.

Thanks,
Somesh Khare

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Already Fixed on Trunk (means that it was already fixed and merged in Trunk). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

7013. By Somesh Khare

[FIX]account: key error credit/debit, when editing the already created journal item from the journal entries menu (Case: Ref 579984)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account.py'
2--- account/account.py 2012-08-28 07:48:35 +0000
3+++ account/account.py 2012-10-04 12:53:34 +0000
4@@ -1369,7 +1369,7 @@
5 balance = 0.0
6 for line in line_ids:
7 if line[2]:
8- balance += (line[2]['debit'] or 0.00)- (line[2]['credit'] or 0.00)
9+ balance += (line[2].get('debit',0.00)- (line[2].get('credit',0.00)))
10 return {'value': {'balance': balance}}
11
12 def write(self, cr, uid, ids, vals, context=None):