From 399c10c20c548f977a6fe2dccbf3404608b752ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 17 Jan 2019 17:16:05 +0100 Subject: [PATCH] Use stable order for FEC lines issue7983 review49691002 --- account.py | 4 +++- tests/FEC.csv | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/account.py b/account.py index f7facaccea..31c985e2d3 100644 --- a/account.py +++ b/account.py @@ -225,7 +225,8 @@ class AccountFrFEC(Wizard): & period.fiscalyear.in_(fiscalyear_ids), group_by=[ account.id, account.code, account.name, - party.code, party.name])) + party.code, party.name], + order_by=account.code)) cursor.execute(*query) for row in cursor: _, code, name, party_code, party_name, balance = row @@ -271,6 +272,7 @@ class AccountFrFEC(Wizard): domain, order=[ ('move.post_number', 'ASC'), + ('id', 'ASC'), ]) def get_row(self, line, format_date, format_number): diff --git a/tests/FEC.csv b/tests/FEC.csv index 4ab55e2a21..0c0880c49b 100644 --- a/tests/FEC.csv +++ b/tests/FEC.csv @@ -1,5 +1,5 @@ JournalCode JournalLib EcritureNum EcritureDate CompteNum CompteLib CompAuxNum CompAuxLib PieceRef PieceDate EcritureLib Debit Credit EcritureLet DateLet ValidDate Montantdevise Idevise -OUV Balance Initiale 0 20180101 797 Transferts de charges exceptionnelles - 20180101 - 0,00 5,00 20180101 OUV Balance Initiale 0 20180101 4967 Autres comptes débiteurs 2 Party - 20180101 - 5,00 0,00 20180101 +OUV Balance Initiale 0 20180101 797 Transferts de charges exceptionnelles - 20180101 - 0,00 5,00 20180101 REV Revenue 1 20180101 797 Transferts de charges exceptionnelles - 20180101 - 0,00 10,00 20180101 REV Revenue 1 20180101 4967 Autres comptes débiteurs 2 Party - 20180101 - 10,00 0,00 20180101