diff options
| author | ATP(OpenERP) <> | 2010-02-15 12:47:01 +0530 |
|---|---|---|
| committer | Jay (Open ERP) <jvo@tinyerp.com> | 2010-02-15 12:47:01 +0530 |
| commit | 9abd6c97c6ff432e2b5d4eafe678b6b007a231ff (patch) | |
| tree | 147b0db355f9c50b15efb8a5acf15f6c3444e128 | |
| parent | 601ae1d14c923398d2a625dc45d4eb65d7b29865 (diff) | |
[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
| -rw-r--r-- | addons/account/project/project.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/addons/account/project/project.py b/addons/account/project/project.py index a7055862cf7..ad96efa76c8 100644 --- a/addons/account/project/project.py +++ b/addons/account/project/project.py @@ -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): |
