[FIX] account: sequence of statement
The sequence used in the bank statement lines is not reliable. Indeed, several lines might have the same sequence. opw-676924
This commit is contained in:
@@ -815,6 +815,7 @@ class AccountBankStatementLine(models.Model):
|
||||
st_line_currency_rate = self.currency_id and (self.amount_currency / self.amount) or False
|
||||
|
||||
# Create the move
|
||||
self.sequence = self.statement_id.line_ids.ids.index(self.id) + 1
|
||||
move_name = (self.statement_id.name or self.name) + "/" + str(self.sequence)
|
||||
move_vals = self._prepare_reconciliation_move(move_name)
|
||||
move = self.env['account.move'].create(move_vals)
|
||||
|
||||
Reference in New Issue
Block a user