From db491b415b5ddfbf2ab3e94adf7134f27f8c8d3c Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Fri, 15 Apr 2011 11:39:42 +0530 Subject: [PATCH] [FIX] account_budget: Print budget report without analytic account gives error bzr revid: ara@tinyerp.com-20110415060942-czsjpgs1jguwvc11 --- addons/account_budget/report/budget_report.py | 2 ++ addons/account_budget/report/crossovered_budget_report.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/addons/account_budget/report/budget_report.py b/addons/account_budget/report/budget_report.py index 8b98b067bb3..7681f9268d9 100644 --- a/addons/account_budget/report/budget_report.py +++ b/addons/account_budget/report/budget_report.py @@ -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', diff --git a/addons/account_budget/report/crossovered_budget_report.py b/addons/account_budget/report/crossovered_budget_report.py index 8a3b745e32a..b70b7da34bb 100644 --- a/addons/account_budget/report/crossovered_budget_report.py +++ b/addons/account_budget/report/crossovered_budget_report.py @@ -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',