Do not filter with context lines for aged balance

Closes #12210
(grafted from 428746eda064bb89c4b1945cdc778efe2d7b7557)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier committed 2024-07-26 23:25:02 +02:00
1 parent c903551fb0
commit f5f0cdc09b
1 file changed
+1 -4
+1 -4
View File
@@ -2937,8 +2937,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)
@@ -2992,8 +2990,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