Somesh Khare(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-579984-skh into
lp:openobject-addons/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579984-skh/+merge/128009
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
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579984-skh/+merge/128009
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-579984-skh.
=== modified file 'account/account.py'
--- account/account.py 2012-08-28 07:48:35 +0000
+++ account/account.py 2012-10-04 12:53:34 +0000
@@ -1369,7 +1369,7 @@
balance = 0.0
for line in line_ids:
if line[2]:
- balance += (line[2]['debit'] or 0.00)- (line[2]['credit'] or 0.00)
+ balance += (line[2].get('debit',0.00)- (line[2].get('credit',0.00)))
return {'value': {'balance': balance}}
def write(self, cr, uid, ids, vals, context=None):
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp