diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index 9357316cf50..5f23675e9b0 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -4965,12 +4965,6 @@ msgstr "" msgid "It is mandatory to specify an account and a journal to create a write-off." msgstr "" -#. module: account -#: code:addons/account/models/account_bank_statement.py:408 -#, python-format -msgid "It is not allowed to delete a bank statement line that already created a journal entry since it would create a gap in the numbering. You should create the journal entry again and cancel it thanks to a regular revert." -msgstr "" - #. module: account #: code:addons/account/models/account_payment.py:322 #, python-format diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 01573491a69..06556747fb2 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -404,8 +404,6 @@ class AccountBankStatementLine(models.Model): for line in self: if line.journal_entry_ids.ids: raise UserError(_('In order to delete a bank statement line, you must first cancel it to delete related journal items.')) - if line.move_name: - raise UserError(_('It is not allowed to delete a bank statement line that already created a journal entry since it would create a gap in the numbering. You should create the journal entry again and cancel it thanks to a regular revert.')) return super(AccountBankStatementLine, self).unlink() @api.model diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 21e70f83ff9..bae80439415 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -174,11 +174,6 @@ class AccountMove(models.Model): #check the lock date + check if some entries are reconciled move.line_ids._update_check() move.line_ids.unlink() - - # remove reference set at statement reconciliation - if move.statement_line_id.move_name: - move.statement_line_id.move_name = False - return super(AccountMove, self).unlink() @api.multi