diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 3f75f605644..e60c0dc09d4 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -247,7 +247,7 @@ class AccountBankStatement(models.Model): raise UserError(_('All the account entries lines must be processed in order to close the statement.')) moves = (moves | st_line.journal_entry_ids) if moves: - moves.post() + moves.filtered(lambda m: m.state != 'posted').post() statement.message_post(body=_('Statement %s confirmed, journal items were created.') % (statement.name,)) statements.link_bank_to_partner() statements.write({'state': 'confirm', 'date_done': time.strftime("%Y-%m-%d %H:%M:%S")})