diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml index f74fc8d21b4..fb8eb53c418 100644 --- a/addons/account/report/account_balance.rml +++ b/addons/account/report/account_balance.rml @@ -59,18 +59,8 @@ - - - - - - - - - - - - + + @@ -180,4 +170,4 @@ - \ No newline at end of file + diff --git a/addons/account/report/account_tax_code.py b/addons/account/report/account_tax_code.py index 21126c57146..773e9541d79 100644 --- a/addons/account/report/account_tax_code.py +++ b/addons/account/report/account_tax_code.py @@ -37,27 +37,27 @@ class account_tax_code_report(rml_parse.rml_parse): }) def get_line(self,obj): - res ={} - result=[] + res = {} + result = [] line_ids = self.pool.get('account.move.line').search(self.cr,self.uid,[('tax_code_id','=',obj.id)]) if line_ids: - b_objs = self.pool.get('account.move.line').browse(self.cr,self.uid,line_ids) - for line in b_objs: + move_line_objs = self.pool.get('account.move.line').browse(self.cr,self.uid,line_ids) + for line in move_line_objs: res['date'] = line.date res['ref'] = line.ref res['acode'] = line.account_id.code + res['pname'] = '' + res['country'] = '' + if line.partner_id: res['pname'] = line.partner_id.name - res['country'] = '' - if line.partner_id.address: - if line.partner_id.address[0].country_id: + if line.partner_id.address and line.partner_id.address[0].country_id: res['country'] = line.partner_id.address[0].country_id.code - else: - res['pname'] = '' res['name'] = line.name res['debit'] = line.debit res['credit'] = line.credit result.append(res) + return result report_sxw.report_sxw('report.account.tax.code.entries', 'account.tax.code', diff --git a/addons/account/report/tax_report.py b/addons/account/report/tax_report.py index abbef9ab238..79e59959d12 100644 --- a/addons/account/report/tax_report.py +++ b/addons/account/report/tax_report.py @@ -57,7 +57,7 @@ class tax_report(rml_parse.rml_parse): return new else: return self.comma_me(new) - def _get_lines(self, based_on,period_list,company_id, parent=False, level=0): + def _get_lines(self, based_on,period_list,company_id=False, parent=False, level=0): res = self._get_codes(based_on,company_id,parent,level,period_list) if period_list[0][2] :