From 21ed7a5f7a67b9f90d736f8dcd521522ef7f421c Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Wed, 21 Jul 2010 15:04:00 +0530 Subject: [PATCH] [Fix] account: Remove the currency from account_journal bzr revid: sbh@tinyerp.com-20100721093400-8bamp5g5moymjzko --- addons/account/report/account_journal.py | 13 ------------- addons/account/report/account_journal.rml | 3 +-- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py index f2c5f37dbab..9adec6648df 100644 --- a/addons/account/report/account_journal.py +++ b/addons/account/report/account_journal.py @@ -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': diff --git a/addons/account/report/account_journal.rml b/addons/account/report/account_journal.rml index ee720c04860..f1ca8ef32f5 100644 --- a/addons/account/report/account_journal.rml +++ b/addons/account/report/account_journal.rml @@ -304,7 +304,6 @@ [[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]] [[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ formatLang((sum_debit(o.period_id.id, o.journal_id.id) - sum_credit(o.period_id.id, o.journal_id.id))) ]] - [[ o.journal_id.currency and formatLang(sum_currency_amount_account(o,data)) + o.journal_id.currency.code or '' ]] [[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]][[ formatLang(line.date,date=True) ]] @@ -315,7 +314,7 @@ [[ formatLang(line.debit) ]] [[ formatLang(line.credit) ]] [[ formatLang(line.credit - line.debit) ]] - [[ line.account_id.currency_id and formatLang(line.amount_currency) or '' ]] [[ line.amount_currency.code or '']] + [[ line.currency_id and formatLang(line.amount_currency) or '' ]] [[ line.currency_id.code or '']]