From 2fe19842c913125b5fbc626fbc5b64533b9130e6 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 20 Jul 2010 17:12:50 +0530 Subject: [PATCH] [IMP] account: Improve the third_party_ledger report header bzr revid: sbh@tinyerp.com-20100720114250-o9jpiu2a8fztb5or --- addons/account/report/third_party_ledger.py | 10 ++++++++++ addons/account/report/third_party_ledger_other.rml | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/addons/account/report/third_party_ledger.py b/addons/account/report/third_party_ledger.py index 0c9eb79cd38..fe9cca79176 100644 --- a/addons/account/report/third_party_ledger.py +++ b/addons/account/report/third_party_ledger.py @@ -54,6 +54,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header): 'get_start_date':self._get_start_date, 'get_end_date':self._get_end_date, 'get_journal': self._get_journal, + 'get_partners':self._get_partners, }) @@ -410,6 +411,15 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header): def _get_currency(self, form): return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).currency_id.name + 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 '' + 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,)) diff --git a/addons/account/report/third_party_ledger_other.rml b/addons/account/report/third_party_ledger_other.rml index 982253cb577..bbd2b7c533e 100644 --- a/addons/account/report/third_party_ledger_other.rml +++ b/addons/account/report/third_party_ledger_other.rml @@ -138,13 +138,14 @@ - + Company [[ data['model']=='account.journal.period' or removeParentNode('para') ]] Chart of Account [[ data['model']=='ir.ui.menu' or removeParentNode('para') ]] Fiscal Year Journal Filters By + Partner's Printing Date @@ -173,6 +174,7 @@ + [[ get_partners(data) ]] [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]]