From 0fe0cb06fa2034cb04ff1122947c8a4bc80c4afc Mon Sep 17 00:00:00 2001 From: Francesco Apruzzese Date: Wed, 27 Apr 2016 18:52:03 +0200 Subject: [PATCH] [IMP] Fill open invoice report with informations keep from account move lines --- .../report/__init__.py | 1 + .../report/open_invoice.py | 19 +++ .../report/templates/open_invoice_report.xml | 109 ++++++++---------- .../wizard/open_invoice_wizard.py | 62 +++++++++- 4 files changed, 127 insertions(+), 64 deletions(-) create mode 100644 account_financial_report_qweb/report/open_invoice.py diff --git a/account_financial_report_qweb/report/__init__.py b/account_financial_report_qweb/report/__init__.py index 231ff56b..329caec3 100644 --- a/account_financial_report_qweb/report/__init__.py +++ b/account_financial_report_qweb/report/__init__.py @@ -4,3 +4,4 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).- from . import common from . import general_ledger +from . import open_invoice diff --git a/account_financial_report_qweb/report/open_invoice.py b/account_financial_report_qweb/report/open_invoice.py new file mode 100644 index 00000000..0a1bb5cb --- /dev/null +++ b/account_financial_report_qweb/report/open_invoice.py @@ -0,0 +1,19 @@ +from openerp import models, api + +class OpenInvoiceReport(models.AbstractModel): + + _name = 'report.account_financial_report_qweb.open_invoice_report_qweb' + + @api.multi + def render_html(self, data=None): + report_obj = self.env['report'] + doc_ids = self._ids + docargs = { + 'doc_model': 'account.move.line', + 'doc_ids': doc_ids, + } + if data: + docargs.update(data) + return report_obj.render( + 'account_financial_report_qweb.open_invoice_report_qweb', + docargs) 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 d5c869cf..8cfc69da 100644 --- a/account_financial_report_qweb/report/templates/open_invoice_report.xml +++ b/account_financial_report_qweb/report/templates/open_invoice_report.xml @@ -2,7 +2,7 @@ -