General ledger context from_date returning date minus a day


When I’m browsing the General Ledger - Lines from an account, filtering the move lines by date is making the from_date to always search it’s previous day.

This is an screenshot from

As you can see I’m filtering from 2021-04-03 to 2021-04-03, so I don’t expect the lines with 2021-04-02 to show up.

Following back the code, I see that this is the method changing the context from_date this is the method changing the context from_date, but I can’t figure / understand its use. This method is being called from modules/account: 3e4a56ae3e31 (

Would someone please explain it or reference me to some documentation?

Thank you

For me the get_dates is correct to remove 1 day to the from_date because it is to have the date periods on which to compute the start balance.
The problem is in _debit_credit_context which uses this date as from_date to compute the debit/credit and filter the lines.

Here is Issue 11322: Wrong from_date in _debit_credit_context of GL - Tryton issue tracker

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.