[IMP] account : Improve the account_journal report

bzr revid: sbh@tinyerp.com-20100720054311-gifnrjm4edrjldah
This commit is contained in:
sbh (Open ERP)
2010-07-20 11:13:11 +05:30
parent 748abf1760
commit d92338628b
2 changed files with 8 additions and 3 deletions
+6
View File
@@ -99,6 +99,12 @@ class journal_print(report_sxw.rml_parse, common_report_header):
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)
report_sxw.report_sxw('report.account.journal.period.print', 'account.journal.period', 'addons/account/report/account_journal.rml', parser=journal_print, header='internal')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -3
View File
@@ -205,8 +205,7 @@
</para>
<blockTable colWidths="80.0,80.0,80.0,120.0,70.0,100.0" style="Table2">
<tr>
<td><para style="terp_tblheader_General_Centre"><font> Chat Account[[ data['model']=='account.journal.period' and removeParentNode('font') ]]</font>
<font> Company [[ data['model']=='account.journal.period' or removeParentNode('font') and '' ]]</font></para></td>
<td><para style="terp_tblheader_General_Centre"><font> Chat Account</font></para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
<td><para style="terp_tblheader_General_Centre">Filters By <font color="white">[[ get_filter(data)!='No Filter' and '' or removeParentNode('font') ]]</font><font>[[ get_filter(data) or '' ]]</font></para></td>
@@ -214,7 +213,7 @@
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
</tr>
<tr>
<td><para style="terp_default_Centre_8">[[ get_account(data) or data['model']=='account.journal.period' and o.company_id.name ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or data['model']=='account.journal.period' and o.fiscalyear_id.name ]]</para></td>
<td><para style="terp_default_Centre_8">[[o.journal_id.name ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>