[IMP] account: Improve the third_party_ledger report header
bzr revid: sbh@tinyerp.com-20100720114250-o9jpiu2a8fztb5or
This commit is contained in:
parent
8d27ab2529
commit
2fe19842c9
|
@ -54,6 +54,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
|
|||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
'get_journal': self._get_journal,
|
||||
'get_partners':self._get_partners,
|
||||
|
||||
})
|
||||
|
||||
|
@ -410,6 +411,15 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
|
|||
def _get_currency(self, form):
|
||||
return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).currency_id.name
|
||||
|
||||
def _get_partners(self, data):
|
||||
if data['form']['result_selection']=='customer':
|
||||
return 'Receivable Accounts'
|
||||
elif data['form']['result_selection']=='supplier':
|
||||
return 'Payable Accounts'
|
||||
elif data['form']['result_selection']=='customer_supplier':
|
||||
return 'Receivable and Payable Accounts'
|
||||
return ''
|
||||
|
||||
def _sum_currency_amount_account(self, account, form):
|
||||
self._set_get_account_currency_code(account.id)
|
||||
self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %s ", (account.id,))
|
||||
|
|
|
@ -138,13 +138,14 @@
|
|||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="80.0,80.0,80.0,140.0,80.0" style="Table2_header">
|
||||
<blockTable colWidths="80.0,80.0,80.0,130.0,70.0,80.0" style="Table2_header">
|
||||
<tr>
|
||||
<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">Journal</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filters By </para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Partner's</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -173,6 +174,7 @@
|
|||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_partners(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
Loading…
Reference in New Issue