changeset 132b7005ea62 in modules/account:6.2 details: https://hg.tryton.org/modules/account?cmd=changeset&node=132b7005ea62 description: Use from_date and to_date for the debit/credit context
Using get_dates is wrong because it provides the range for the start balance which is one day before. issue11322 review390271002 (grafted from 2dd2cdc9f5db13529faadc9a10186bfac3ac2531) diffstat: account.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (16 lines): diff -r 85a9738cc0db -r 132b7005ea62 account.py --- a/account.py Sun Mar 06 13:45:10 2022 +0100 +++ b/account.py Fri Apr 01 23:45:37 2022 +0200 @@ -1773,9 +1773,9 @@ start_period_ids = set(cls.get_period_ids('start_balance')) end_period_ids = set(cls.get_period_ids('end_balance')) period_ids = list(end_period_ids.difference(start_period_ids)) - elif context.get('from_date') or context.get('end_date'): - _, from_date = cls.get_dates('start_balance') - _, to_date = cls.get_dates('end_balance') + elif context.get('from_date') or context.get('to_date'): + from_date = context.get('from_date') + to_date = context.get('to_date') return { 'periods': period_ids, 'from_date': from_date,