[FIX] Account : Analytic charts of accounts was raising exception on displaying chart

lp bug: https://launchpad.net/bugs/521106 fixed

bzr revid: jvo@tinyerp.com-20100215071701-9ksgpuah9l3yjzbu
This commit is contained in:
ATP(OpenERP) 2010-02-15 12:47:01 +05:30 committed by Jay (Open ERP)
parent 601ae1d14c
commit 9abd6c97c6
1 changed files with 14 additions and 1 deletions

View File

@ -35,7 +35,14 @@ class account_analytic_account(osv.osv):
_description = 'Analytic Accounts'
def _credit_calc(self, cr, uid, ids, name, arg, context={}):
r = {}
acc_set = ",".join(map(str, ids))
for i in ids:
r.setdefault(i,0.0)
if not acc_set:
return r
where_date = ''
if context.get('from_date',False):
@ -50,8 +57,14 @@ class account_analytic_account(osv.osv):
return r
def _debit_calc(self, cr, uid, ids, name, arg, context={}):
r = {}
acc_set = ",".join(map(str, ids))
for i in ids:
r.setdefault(i,0.0)
if not acc_set:
return r
where_date = ''
if context.get('from_date',False):