Aged Balance is considering move lines only from open fiscal years

Hi guys,
I’m having problems with the aged balance report that is showing the balances considering only move lines from open fiscal years. I traced the issue to the method Line.query_get, which specifically limits the query to “open” fiscal years. The question is: is this a bug in the system or a problem with my specific context?.. here the relevant lines of code (in Line.query_get):

Blockquote

if to_date:
where &= move.date <= to_date
else:
where &= fiscalyear.state == ‘open’
where &= fiscalyear.company == company

Please fill a bug report: https://bugs.tryton.org/

Indeed, there is one open issue for this very same problem Issue 12210

I’d be happy to help close it. I see that the query_get method is used five times in the account module and two times in the account_deposit module; I’m not aware if the other calls require the current behavior or if it’s an issue with the method itself; Do you have any suggestions here?