From 9ad98c25d40091a02c72e68aafd5bad4dd2c1d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 21 Feb 2021 19:19:26 +0100 Subject: [PATCH] Add header grouping on report issue6760 review351221002 --- invoice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/invoice.py b/invoice.py index bc94bb8568..e8fa4e9595 100644 --- a/invoice.py +++ b/invoice.py @@ -2613,7 +2613,7 @@ class InvoiceReport(Report): cls.__rpc__['execute'] = RPC(False) @classmethod - def _execute(cls, records, data, action): + def _execute(cls, records, header, data, action): pool = Pool() Invoice = pool.get('account.invoice') # Re-instantiate because records are TranslateModel @@ -2623,7 +2623,7 @@ class InvoiceReport(Report): invoice.invoice_report_format, bytes(invoice.invoice_report_cache)) else: - result = super(InvoiceReport, cls)._execute(records, data, action) + result = super()._execute(records, header, data, action) # If the invoice is posted or paid and the report not saved in # invoice_report_cache there was an error somewhere. So we save it # now in invoice_report_cache @@ -2648,10 +2648,10 @@ class InvoiceReport(Report): return super().execute(ids, data) @classmethod - def get_context(cls, records, data): + def get_context(cls, records, header, data): pool = Pool() Date = pool.get('ir.date') - context = super(InvoiceReport, cls).get_context(records, data) + context = super().get_context(records, header, data) context['invoice'] = context['record'] context['today'] = Date.today() return context