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) ]]