diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py index 67a5f04f504..2ddf6711cad 100644 --- a/addons/account/report/account_journal.py +++ b/addons/account/report/account_journal.py @@ -50,7 +50,7 @@ class journal_print(report_sxw.rml_parse, common_report_header): 'get_fiscalyear': self._get_fiscalyear, 'get_start_date':self._get_start_date, 'get_end_date':self._get_end_date, - 'print_data':self._print_data, + 'get_currency':self._get_currency, 'get_sortby': self._get_sortby, }) @@ -97,9 +97,9 @@ class journal_print(report_sxw.rml_parse, common_report_header): 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 _print_data(self, data): + def _get_currency(self, data): if data['model'] == 'account.journal.period': - return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).journal_id.currency or False + return True return data['form']['amount_currency'] def _get_sortby(self, data): diff --git a/addons/account/report/account_journal.rml b/addons/account/report/account_journal.rml index b9d97d16028..18568cb79f0 100644 --- a/addons/account/report/account_journal.rml +++ b/addons/account/report/account_journal.rml @@ -249,7 +249,7 @@ - [[ print_data(data) == False or removeParentNode('blockTable') ]] + [[ get_currency(data) == False or removeParentNode('blockTable') ]] Date Voucher No @@ -283,7 +283,7 @@ - [[ print_data(data) or removeParentNode('blockTable') ]] + [[ get_currency(data) or removeParentNode('blockTable') ]] Date Voucher No diff --git a/addons/account/report/central_journal.py b/addons/account/report/central_journal.py index 981966276d8..bb01a83b3b2 100644 --- a/addons/account/report/central_journal.py +++ b/addons/account/report/central_journal.py @@ -48,7 +48,7 @@ class journal_print(report_sxw.rml_parse, common_report_header): 'get_sortby': self._get_sortby, 'get_start_date':self._get_start_date, 'get_end_date':self._get_end_date, - 'print_data':self._print_data, + 'get_currency':self._get_currency, }) def set_context(self, objects, data, ids, report_type=None): # Improve move to common default? @@ -89,9 +89,9 @@ class journal_print(report_sxw.rml_parse, common_report_header): 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) - def _print_data(self, data): + def _get_currency(self, data): if data['model']=='account.journal.period': - return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).journal_id.currency or False + return True return data['form']['amount_currency'] report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/central_journal.rml', parser=journal_print, header='internal') diff --git a/addons/account/report/central_journal.rml b/addons/account/report/central_journal.rml index 3d91f915af7..82d081a925e 100644 --- a/addons/account/report/central_journal.rml +++ b/addons/account/report/central_journal.rml @@ -4,30 +4,7 @@ - - - - - - - - - - - [[ company.name ]] - Central Journal - [[ company.currency_id.name ]] - - - - [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]] - Page - - - - - 0.88cm 27.7cm 20.12cm 27.7cm - @@ -306,7 +283,7 @@ - [[ print_data(data) == False or removeParentNode('blockTable') ]] + [[ get_currency(data) == False or removeParentNode('blockTable') ]] A/C No. Account Name @@ -315,7 +292,7 @@ Balance - [[ print_data(data) or removeParentNode('blockTable') ]] + [[ get_currency(data) or removeParentNode('blockTable') ]] A/C No. Account Name @@ -328,7 +305,7 @@ - [[ print_data(data) == False or removeParentNode('blockTable') ]] + [[ get_currency(data) == False or removeParentNode('blockTable') ]] Total: @@ -337,7 +314,7 @@ [[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_credit(o.period_id.id, o.journal_id.id) ) ]] - [[ print_data(data) or removeParentNode('blockTable') ]] + [[ get_currency(data) or removeParentNode('blockTable') ]] Total: @@ -352,7 +329,7 @@
[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]] - [[ print_data(data) == False or removeParentNode('blockTable') ]] + [[ get_currency(data) == False or removeParentNode('blockTable') ]] [[ line['code'] ]] [[ line['name'] ]] @@ -361,7 +338,7 @@ [[ formatLang(line['debit']-line['credit']) ]] - [[ print_data(data) or removeParentNode('blockTable') ]] + [[ get_currency(data) or removeParentNode('blockTable') ]] [[ line['code'] ]] [[ line['name'] ]]