From 33de40f77b0ed41ad46aee2b7761dd0e461d1b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 21 Oct 2023 16:21:40 +0200 Subject: [PATCH] Test to_date in context to get dates for general ledger 1b3d9d7a758f added the wrong test to exclude period and dates. Closes #12629 --- modules/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/account/account.py b/modules/account/account.py index f0f6cdf20b..11225ae174 100644 --- a/modules/account/account.py +++ b/modules/account/account.py @@ -1990,7 +1990,7 @@ class _GeneralLedgerAccount(ActivePeriodMixin, ModelSQL, ModelView): context = LedgerAccountContext.get_context() if context.get('start_period') or context.get('end_period'): period_ids = cls.get_period_ids(name) - elif context.get('from_date') or context.get('end_date'): + elif context.get('from_date') or context.get('to_date'): from_date, to_date = cls.get_dates(name) else: if name.startswith('start_'):