[FIX] account_budget: Print budget report without analytic account gives error

bzr revid: ara@tinyerp.com-20110415060942-czsjpgs1jguwvc11
This commit is contained in:
ARA (OpenERP) 2011-04-15 11:39:42 +05:30
parent ad0ececa4e
commit db491b415b
2 changed files with 4 additions and 0 deletions

View File

@ -67,6 +67,8 @@ class budget_report(report_sxw.rml_parse):
context = {'wizard_date_from': d_from, 'wizard_date_to': d_to}
for i in range(0, len(an_ids)):
if not an_ids[i][0]:
continue
analytic_name = acc_analytic_obj.browse(self.cr, self.uid, [an_ids[i][0]])
res={
'b_id': '-1',

View File

@ -72,6 +72,8 @@ class budget_report(report_sxw.rml_parse):
context = {'wizard_date_from': d_from, 'wizard_date_to': d_to}
for i in range(0, len(an_ids)):
if not an_ids[i][0]:
continue
analytic_name = acc_analytic_obj.browse(self.cr, self.uid, [an_ids[i][0]])
res={
'b_id': '-1',