diff options
| author | sbh (Open ERP) <sbh@tinyerp.com> | 2010-07-20 11:49:44 +0530 |
|---|---|---|
| committer | sbh (Open ERP) <sbh@tinyerp.com> | 2010-07-20 11:49:44 +0530 |
| commit | 2c19dd689dcec58dfb1efa4464a42e5cfac45d72 (patch) | |
| tree | 084c9d0570594f88f932002a1efe837ce210b833 | |
| parent | a1e46372bd032af1c284cfb6ac77550de2bbc3ce (diff) | |
[IMP] account: Imporve the general_journal report
bzr revid: sbh@tinyerp.com-20100720061944-j0he1x32jw9ibo90
| -rw-r--r-- | addons/account/report/common_report_header.py | 2 | ||||
| -rw-r--r-- | addons/account/report/general_journal.py | 10 | ||||
| -rw-r--r-- | addons/account/report/general_journal.rml | 3 |
3 files changed, 13 insertions, 2 deletions
diff --git a/addons/account/report/common_report_header.py b/addons/account/report/common_report_header.py index 17bbde1499b..1245e0eb639 100644 --- a/addons/account/report/common_report_header.py +++ b/addons/account/report/common_report_header.py @@ -131,6 +131,6 @@ class common_report_header(object): 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()] - return codes or '' + return codes #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file diff --git a/addons/account/report/general_journal.py b/addons/account/report/general_journal.py index 61f38a5d17a..2b137ca4b49 100644 --- a/addons/account/report/general_journal.py +++ b/addons/account/report/general_journal.py @@ -115,6 +115,16 @@ class journal_print(report_sxw.rml_parse, common_report_header): else: currency_total = self.tot_currency = 0.0 return currency_total + def _get_account(self, data): + if data['model']=='account.journal.period': + return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).company_id.name + return super(journal_print ,self)._get_account(data) + + def _get_fiscalyear(self, data): + if data['model']=='account.journal.period': + return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).fiscalyear_id.name + return super(journal_print ,self)._get_fiscalyear(data) + report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print, header='internal') # 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 a3e960d7671..a7179e714b2 100644 --- a/addons/account/report/general_journal.rml +++ b/addons/account/report/general_journal.rml @@ -247,7 +247,8 @@ </blockTable> <blockTable colWidths="80.0,100,80.0,150.0,100.0" style="Table2"> <tr> - <td><para style="terp_tblheader_General_Centre">Chat Account</para></td> + <td><para style="terp_tblheader_General_Centre">Company <font color="white"> [[ data['model']=='account.journal.period' or removeParentNode('para') ]]</font></para> + <para style="terp_tblheader_General_Centre">Chart of Account <font color="white"> [[ data['model']=='ir.ui.menu' or removeParentNode('para') ]]</font></para></td> <td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td> <td><para style="terp_tblheader_General_Centre">Journals</para></td> <td><para style="terp_tblheader_General_Centre">Filters By <font>[[ get_filter(data)!='No Filter' and '' or removeParentNode('font') ]]</font></para></td> |
