Do not filter with context lines for aged balance

Closes #12210
This commit is contained in:
Cédric Krier committed 2024-07-26 23:25:02 +02:00
1 parent 147be849f4
commit 20a3f53d2b
1 file changed
+1 -4
+1 -4
View File
@@ -3011,8 +3011,6 @@ class AgedBalance(ModelSQL, ModelView):
company_id = context.get('company')
date = context.get('date')
with Transaction().set_context(date=None):
line_query, _ = MoveLine.query_get(line)
kind = cls.get_kind(type_)
debit_kind = (
cls.get_kind(debit_type)
@@ -3066,8 +3064,7 @@ class AgedBalance(ModelSQL, ModelView):
& ((line.reconciliation == Null)
| (reconciliation.date > date))
& (move.date <= date)
& (account.company == company_id)
& line_query,
& (account.company == company_id),
group_by=(line.party, move.company))
@classmethod