From 8fc81b871debc2dfc81fd9968dcdb2509779f66f Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 8 Nov 2016 10:53:30 +0100 Subject: [PATCH] [FIX] account: sequence of statement It can happen that the account moves generated during reconciliation from a bank statement with several lines have the same number. This is a complement of commit 9365482df05. The order of statement lines is not derterministic since it is based on `statement_id desc, sequence`. Therefore, at each call of `process_reconciliation`, the array `self.statement_id.line_ids.ids` can be different. opw-690853 --- addons/account/models/account_bank_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 35e75ff7959..dbc0575735b 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -351,7 +351,7 @@ class AccountBankStatement(models.Model): class AccountBankStatementLine(models.Model): _name = "account.bank.statement.line" _description = "Bank Statement Line" - _order = "statement_id desc, sequence" + _order = "statement_id desc, sequence, id desc" _inherit = ['ir.needaction_mixin'] name = fields.Char(string='Memo', required=True)