From d50ef4ef0bae7339c395fbc33dd547c996d3d2cb Mon Sep 17 00:00:00 2001 From: Jorge Angel Naranjo Rogel Date: Fri, 26 Jul 2013 15:03:23 -0700 Subject: [PATCH] [IMP][account_financial_report] Improvement function get_vat_by_country --- account_financial_report/report/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_financial_report/report/parser.py b/account_financial_report/report/parser.py index c35e59a8..9ea487f2 100644 --- a/account_financial_report/report/parser.py +++ b/account_financial_report/report/parser.py @@ -69,7 +69,7 @@ class account_balance(report_sxw.rml_parse): Return the vat of the partner by country """ rc_obj = self.pool.get('res.company') - country_code=rc_obj.browse(self.cr, self.uid, form['company_id'][0]).partner_id.country_id.code + country_code=rc_obj.browse(self.cr, self.uid, form['company_id'][0]).partner_id.country_id.code or '' string_vat= rc_obj.browse(self.cr, self.uid, form['company_id'][0]).partner_id.vat or '' if string_vat: if country_code=='MX':