From 3cf22f6118451dc1de4d8165bfa2b1f2eea2480c Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Thu, 15 Jul 2010 16:20:38 +0530 Subject: [PATCH] [IMP] : Improve the header fo journal report bzr revid: sbh@tinyerp.com-20100715105038-bgjul8cg0ukw9hse --- addons/account/report/account_journal.py | 5 +- addons/account/report/account_journal.rml | 104 ++++++++++++++++------ 2 files changed, 78 insertions(+), 31 deletions(-) diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py index 217906a30f1..fbb6f681fac 100644 --- a/addons/account/report/account_journal.py +++ b/addons/account/report/account_journal.py @@ -46,7 +46,8 @@ 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, + 'sum_currency_amount_account': self._sum_currency_amount_account, + 'get_fiscalyear': self._get_fiscalyear, }) def set_context(self, objects, data, ids, report_type=None): # Improve move to common default? @@ -95,6 +96,6 @@ class journal_print(report_sxw.rml_parse, common_report_header): currency_total = self.tot_currency = 0.0 return currency_total -report_sxw.report_sxw('report.account.journal.period.print', 'account.journal.period', 'addons/account/report/account_journal.rml', parser=journal_print, header=False) +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: \ No newline at end of file diff --git a/addons/account/report/account_journal.rml b/addons/account/report/account_journal.rml index 10f2da45182..afa644b9237 100644 --- a/addons/account/report/account_journal.rml +++ b/addons/account/report/account_journal.rml @@ -57,9 +57,34 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -125,11 +150,11 @@ - + - - - + + + @@ -173,7 +198,7 @@ - + @@ -184,6 +209,8 @@ + + @@ -205,37 +232,52 @@ - + - Start Date - End Date + Chat Account + Fiscal Year + Journal + Filters By [[ get_filter(data)!='No Filter' and '' or removeParentNode('font') ]] Entries Sorted By - Account - Start Period - End Period - Filters By Printing Date - - - - [[ get_start_date(data) ]] - [[ get_end_date(data)]] + + [[ get_account(data) or removeParentNode('para') ]] + [[ get_fiscalyear(data) or removeParentNode('para') ]] + [[o.journal_id.name ]] + [[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] + [[ get_filter(data)=='Date' or removeParentNode('blockTable') ]] + + Start Date + End Date + + + [[ data['form']['date_from'] ]] + [[ data['form']['date_to'] ]] + + + [[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]] + + Start Period + End Period + + + [[ get_start_period(data) or removeParentNode('para') ]] + [[ get_end_period(data) or removeParentNode('para') ]] + + + [[ data and 'form' in data and data['form']['sort_selection'] or 'Date' ]] - [[ get_account(data) or removeParentNode('para') ]] - [[ get_start_period(data) or removeParentNode('para') ]] - [[ get_end_period(data) or removeParentNode('para') ]] - [[ get_filter(data) or removeParentNode('para') ]] - [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] - - + [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] + + - [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] + [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] Date Voucher No @@ -244,6 +286,7 @@ Entry label Debit Credit + Balance [[o.period_id.name ]] @@ -262,10 +305,11 @@ [[ line.name ]] [[ formatLang(line.debit) ]] [[ formatLang(line.credit) ]] + [[ formatLang(line.credit - line.debit) ]] - [[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]] + [[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]] Date Voucher No @@ -274,6 +318,7 @@ Entry label Debit Credit + Balance Currency @@ -284,6 +329,7 @@ [[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]] [[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]] + [[formatLang(sum_currency_amount_account(o, data['form'])) ]]