[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 9365482df0. 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
This commit is contained in:
Nicolas Martinelli
2016-11-08 10:53:30 +01:00
parent 11321b09fb
commit 8fc81b871d
@@ -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)