From a1e46372bd032af1c284cfb6ac77550de2bbc3ce Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 20 Jul 2010 11:37:19 +0530 Subject: [PATCH] [IMP] account : Improve the general_journal report bzr revid: sbh@tinyerp.com-20100720060719-8v7857b78d17t6dn --- addons/account/report/common_report_header.py | 3 ++- addons/account/report/general_journal.rml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/account/report/common_report_header.py b/addons/account/report/common_report_header.py index fb339ca9a30..17bbde1499b 100644 --- a/addons/account/report/common_report_header.py +++ b/addons/account/report/common_report_header.py @@ -127,9 +127,10 @@ class common_report_header(object): return '' def _get_journal(self, data): + codes=[] if data.get('form', False) and data['form'].get('journal_ids', False): self.cr.execute('select code from account_journal where id IN %s',(tuple(data['form']['journal_ids']),)) - codes = [x for x, in self.cr.fetchall()] + codes = [x for x, in self.cr.fetchall()] return codes or '' #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account/report/general_journal.rml b/addons/account/report/general_journal.rml index 53d473b9349..a3e960d7671 100644 --- a/addons/account/report/general_journal.rml +++ b/addons/account/report/general_journal.rml @@ -256,7 +256,7 @@ [[ get_account(data) or removeParentNode('para') ]] [[ get_fiscalyear(data) or removeParentNode('para') ]] - [[', '.join([ lt or '' for lt in get_journal(data['form']['journal_ids']) ]) ]] + [[', '.join([ lt or '' for lt in get_journal(data) ]) ]] [[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] [[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]