Test to_date in context to get dates for general ledger

1b3d9d7a758f added the wrong test to exclude period and dates.

Closes #12629
This commit is contained in:
Cédric Krier committed 2023-10-21 16:21:40 +02:00
1 parent c577fad900
commit 33de40f77b
1 file changed
+1 -1
+1 -1
View File
@@ -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_'):