Order the lines of the general ledger account

They must use the same order as the order used to calculate the cumulative
balance.

Closes #14829
This commit is contained in:
Cédric Krier
2026-05-11 15:50:41 +02:00
parent 23a96d751d
commit 9d33e837fe
+2 -1
View File
@@ -2110,7 +2110,8 @@ class GeneralLedgerAccount(_GeneralLedgerAccount):
debit_type = fields.Many2One('account.account.type', "Debit Type")
credit_type = fields.Many2One('account.account.type', "Credit Type")
lines = fields.One2Many(
'account.general_ledger.line', 'account', "Lines", readonly=True)
'account.general_ledger.line', 'account', "Lines", readonly=True,
order=[('move.date', 'ASC'), ('id', None)])
general_ledger_balance = fields.Boolean("General Ledger Balance")
@classmethod