diff --git a/account.py b/account.py index 6fb6e21437..3fa807da58 100644 --- a/account.py +++ b/account.py @@ -1325,7 +1325,7 @@ class GeneralLedgerAccount(ActivePeriodMixin, ModelSQL, ModelView): period = None if name.startswith('start_'): - period_ids = [0] + period_ids = [] if context.get('start_period'): period = Period(context['start_period']) elif name.startswith('end_'): @@ -1351,7 +1351,10 @@ class GeneralLedgerAccount(ActivePeriodMixin, ModelSQL, ModelView): def get_dates(cls, name): context = Transaction().context if name.startswith('start_'): - return None, context.get('from_date') + from_date = context.get('from_date') + if from_date: + from_date -= datetime.timedelta(days=1) + return None, from_date elif name.startswith('end_'): return None, context.get('to_date') return None, None