[Fix] account: Remove the currency from account_journal
bzr revid: sbh@tinyerp.com-20100721093400-8bamp5g5moymjzko
This commit is contained in:
parent
6ffa62d435
commit
21ed7a5f7a
|
@ -46,7 +46,6 @@ class journal_print(report_sxw.rml_parse, common_report_header):
|
|||
'get_filter': self._get_filter,
|
||||
'get_start_date': self._get_start_date,
|
||||
'get_end_date': self._get_end_date,
|
||||
'sum_currency_amount_account': self._sum_currency_amount_account,
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
|
@ -87,18 +86,6 @@ class journal_print(report_sxw.rml_parse, common_report_header):
|
|||
self.account_currency = result[0]
|
||||
else:
|
||||
self.account_currency = False
|
||||
|
||||
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,))
|
||||
total = self.cr.fetchone()
|
||||
|
||||
if self.account_currency:
|
||||
return_field = str(total[0]) + self.account_currency
|
||||
return return_field
|
||||
else:
|
||||
currency_total = self.tot_currency = 0.0
|
||||
return currency_total
|
||||
|
||||
def _get_fiscalyear(self, data):
|
||||
if data['model']=='account.journal.period':
|
||||
|
|
|
@ -304,7 +304,6 @@
|
|||
<td><para style="P12"><u>[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]]</u></para></td>
|
||||
<td><para style="P12"><u>[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]]</u></para></td>
|
||||
<td> <para style="P12"><u>[[ formatLang((sum_debit(o.period_id.id, o.journal_id.id) - sum_credit(o.period_id.id, o.journal_id.id))) ]]</u></para></td>
|
||||
<td><para style="P12"><u>[[ o.journal_id.currency and formatLang(sum_currency_amount_account(o,data)) + o.journal_id.currency.code or '' ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_8">[[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]]</para><para style="terp_default_8">[[ formatLang(line.date,date=True) ]]</para></td>
|
||||
|
@ -315,7 +314,7 @@
|
|||
<td><para style="P8">[[ formatLang(line.debit) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit - line.debit) ]]</para></td>
|
||||
<td><para style="P8">[[ line.account_id.currency_id and formatLang(line.amount_currency) or '' ]] [[ line.amount_currency.code or '']]</para></td>
|
||||
<td><para style="P8">[[ line.currency_id and formatLang(line.amount_currency) or '' ]] [[ line.currency_id.code or '']]</para></td>
|
||||
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
Loading…
Reference in New Issue