[FIX] account: Fixed error when a record contains type='Account Report' and then print the Financial report gives recursion error.

bzr revid: uco@tinyerp.com-20110907053246-z0fclnw84s102r2f
This commit is contained in:
Ujjvala Collins (OpenERP) 2011-09-07 11:02:46 +05:30
parent 9a5a5f5dbb
commit 684aed6420
1 changed files with 4 additions and 1 deletions

View File

@ -2650,7 +2650,10 @@ class account_low_level_report(osv.osv):
balance += a.balance
elif report.type == 'account_report' and report.account_report_id:
# it's the amount of the linked report
balance = report.account_report_id.balance
res2 = self._get_balance(cr, uid, [report.account_report_id.id], 'balance', False, context=context)
res_all.update(res2)
for key, value in res2.items():
balance += value
elif report.type == 'sum':
# it's the sum of balance of the children of this account.report
#for child in report.children_ids: