From 736ed55535f6b49b2fddad4501314fc961b2efa2 Mon Sep 17 00:00:00 2001 From: Francesco Apruzzese Date: Thu, 28 Apr 2016 17:29:24 +0200 Subject: [PATCH] [IMP] Open Invoices - Order accounts, partners and moves on report --- account_financial_report_qweb/report/open_invoice.py | 1 + .../report/templates/open_invoice_report.xml | 4 ++-- account_financial_report_qweb/wizard/open_invoice_wizard.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/account_financial_report_qweb/report/open_invoice.py b/account_financial_report_qweb/report/open_invoice.py index 528d1bd3..a652d1a0 100644 --- a/account_financial_report_qweb/report/open_invoice.py +++ b/account_financial_report_qweb/report/open_invoice.py @@ -20,6 +20,7 @@ class OpenInvoiceReport(models.AbstractModel): docargs = { 'doc_model': 'account.move.line', 'doc_ids': doc_ids, + 'sorted': sorted, } if data: docargs.update(data) diff --git a/account_financial_report_qweb/report/templates/open_invoice_report.xml b/account_financial_report_qweb/report/templates/open_invoice_report.xml index f577009b..5c010828 100644 --- a/account_financial_report_qweb/report/templates/open_invoice_report.xml +++ b/account_financial_report_qweb/report/templates/open_invoice_report.xml @@ -56,7 +56,7 @@ - + @@ -64,7 +64,7 @@ - + diff --git a/account_financial_report_qweb/wizard/open_invoice_wizard.py b/account_financial_report_qweb/wizard/open_invoice_wizard.py index 140f173a..3453740c 100644 --- a/account_financial_report_qweb/wizard/open_invoice_wizard.py +++ b/account_financial_report_qweb/wizard/open_invoice_wizard.py @@ -66,7 +66,6 @@ class OpenInvoiceWizard(models.TransientModel): elif data['result_selection'] == 'supplier': account_type = ('payable', ) domain = [ - ('reconciled', '=', False), ('company_id', '=', data['company_id'].id), ('move_id.date', '<=', data['at_date']), ('account_id.user_type_id.type', 'in', account_type) @@ -100,7 +99,8 @@ class OpenInvoiceWizard(models.TransientModel): @api.multi def print_report(self): self.ensure_one() - moves = self.env['account.move.line'].search(self._get_domain(self)) + moves = self.env['account.move.line'].search( + self._get_domain(self), order='date asc') if not moves: return True # ----- Show a message here datas = {}