From 090bd71989fd369d62cc7de34a77fa6b4fa269b4 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 --- account.py | 13 ++++++------- move.py | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/account.py b/account.py index d1ecdaaedd..0636a59498 100644 --- a/account.py +++ b/account.py @@ -2049,14 +2049,14 @@ class GeneralLedger(Report): __name__ = 'account.general_ledger' @classmethod - def get_context(cls, records, data): + def get_context(cls, records, header, data): pool = Pool() Company = pool.get('company.company') Fiscalyear = pool.get('account.fiscalyear') Period = pool.get('account.period') context = Transaction().context - report_context = super(GeneralLedger, cls).get_context(records, data) + report_context = super().get_context(records, header, data) report_context['company'] = Company(context['company']) report_context['fiscalyear'] = Fiscalyear(context['fiscalyear']) @@ -2077,14 +2077,14 @@ class TrialBalance(Report): __name__ = 'account.trial_balance' @classmethod - def get_context(cls, records, data): + def get_context(cls, records, header, data): pool = Pool() Company = pool.get('company.company') Fiscalyear = pool.get('account.fiscalyear') Period = pool.get('account.period') context = Transaction().context - report_context = super(TrialBalance, cls).get_context(records, data) + report_context = super().get_context(records, header, data) report_context['company'] = Company(context['company']) report_context['fiscalyear'] = Fiscalyear(context['fiscalyear']) @@ -2498,15 +2498,14 @@ class AgedBalanceReport(Report): __name__ = 'account.aged_balance' @classmethod - def get_context(cls, records, data): + def get_context(cls, records, header, data): pool = Pool() Company = pool.get('company.company') Context = pool.get('account.aged_balance.context') AgedBalance = pool.get('account.aged_balance') context = Transaction().context - report_context = super(AgedBalanceReport, cls).get_context( - records, data) + report_context = super().get_context(records, header, data) context_fields = Context.fields_get(['type', 'unit']) diff --git a/move.py b/move.py index ada3e6e2f3..fefc135005 100644 --- a/move.py +++ b/move.py @@ -2108,8 +2108,8 @@ class GeneralJournal(Report): order=[('date', 'ASC'), ('id', 'ASC')]) @classmethod - def get_context(cls, records, data): - report_context = super(GeneralJournal, cls).get_context(records, data) + def get_context(cls, records, header, data): + report_context = super().get_context(records, header, data) Company = Pool().get('company.company')