diff --git a/addons/account/report/aged_trial_balance.py b/addons/account/report/aged_trial_balance.py index 2971173ac7d..91687ae4a76 100644 --- a/addons/account/report/aged_trial_balance.py +++ b/addons/account/report/aged_trial_balance.py @@ -40,6 +40,9 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): 'get_for_period': self._get_for_period, 'get_company': self._get_company, 'get_currency': self._get_currency, + 'get_partners':self._get_partners, + 'get_account': self._get_account, + 'get_fiscalyear': self._get_fiscalyear, }) def set_context(self, objects, data, ids, report_type=None): @@ -208,6 +211,15 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): period = self.total_account[int(pos)] return period + 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 '' + report_sxw.report_sxw('report.account.aged_trial_balance', 'res.partner', 'addons/account/report/aged_trial_balance.rml',parser=aged_trial_report, header=False) diff --git a/addons/account/report/aged_trial_balance.rml b/addons/account/report/aged_trial_balance.rml index e566cb4a26d..78c7af3b2af 100644 --- a/addons/account/report/aged_trial_balance.rml +++ b/addons/account/report/aged_trial_balance.rml @@ -3,33 +3,6 @@ @@ -47,6 +20,10 @@ + + + + @@ -60,6 +37,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -95,8 +104,64 @@ + + + + + + + + + + + + Aged Trial balance + + + + + + + Chart of Account + + + Fiscal Year + + + Start Date + + + Partner's + + + Printing Date + + + + + [[ get_account(data) or '' ]] + + + [[ get_fiscalyear(data) or '' ]] + + + [[ data['form']['date_from'] ]] + + + [[ get_partners(data) ]] + + + [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True)]] + + + + + + + +