[FIX] account: [6.0.1] Exception raised when setting an Account InActive
bzr revid: ara@tinyerp.com-20110315100554-ffxi0u7efh07s186
This commit is contained in:
parent
182cb58b7e
commit
a60b7a65e6
|
@ -252,6 +252,7 @@ class account_account(osv.osv):
|
|||
children_and_consolidated = ids
|
||||
#compute for each account the balance/debit/credit from the move lines
|
||||
accounts = {}
|
||||
res = {}
|
||||
if children_and_consolidated:
|
||||
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||
|
||||
|
@ -308,11 +309,10 @@ class account_account(osv.osv):
|
|||
sums[current.id][fn] += sums[child.id][fn]
|
||||
else:
|
||||
sums[current.id][fn] += currency_obj.compute(cr, uid, child.company_id.currency_id.id, current.company_id.currency_id.id, sums[child.id][fn], context=context)
|
||||
res = {}
|
||||
null_result = dict((fn, 0.0) for fn in field_names)
|
||||
for id in ids:
|
||||
res[id] = sums.get(id, null_result)
|
||||
return res
|
||||
return res
|
||||
|
||||
def _get_company_currency(self, cr, uid, ids, field_name, arg, context=None):
|
||||
result = {}
|
||||
|
|
Loading…
Reference in New Issue