[MERGE] account: If the credit or debit field does not exist in the journal entry line, return 0.0
bzr revid: stw@openerp.com-20120905130038-3lk43b0ftzoscobm
This commit is contained in:
commit
2d89c39f89
|
@ -1375,7 +1375,7 @@ class account_move(osv.osv):
|
|||
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):
|
||||
|
|
Loading…
Reference in New Issue