[IMP] account: Imporve the general_journal report
bzr revid: sbh@tinyerp.com-20100720061944-j0he1x32jw9ibo90
This commit is contained in:
@@ -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:
|
||||
@@ -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:
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user