From 9d33e837fec5928c84c8371dcc0ac9e57c0cb091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 11 May 2026 15:50:41 +0200 Subject: [PATCH] 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 --- modules/account/account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/account/account.py b/modules/account/account.py index 3257baf87a..56f3db374b 100644 --- a/modules/account/account.py +++ b/modules/account/account.py @@ -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