From b66f41cdca8d07e8c95c0072464ec83097e791a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 13 Mar 2025 18:34:04 +0100 Subject: [PATCH] Order lines in grouped line by descending id This is to have the same order as the calculation of payable/receivable balance. --- modules/account_move_line_grouping/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/account_move_line_grouping/account.py b/modules/account_move_line_grouping/account.py index b773dbec73..206b56fa2f 100644 --- a/modules/account_move_line_grouping/account.py +++ b/modules/account_move_line_grouping/account.py @@ -118,7 +118,7 @@ class MoveLineGroup(MoveLineMixin, ModelSQL, ModelView): lines = fields.Many2Many( 'account.move.line.group-move.line', 'group', 'line', "Lines", - readonly=True) + readonly=True, order=[('id', 'DESC')]) currency = fields.Function(fields.Many2One( 'currency.currency', "Currency"), 'on_change_with_currency')