diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index 7d04aa32e6d..a5336193698 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -849,6 +849,12 @@ msgstr "" msgid "A selected move line was already reconciled." msgstr "" +#. module: account +#: code:addons/account/models/account_bank_statement.py:883 +#, python-format +msgid "A selected statement line was already reconciled with an account move." +msgstr "" + #. module: account #: code:addons/account/models/account_bank_statement.py:218 #, python-format diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 8e424aff77b..157fdbedf4a 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -879,6 +879,8 @@ class AccountBankStatementLine(models.Model): if aml_dict.get('tax_ids') and aml_dict['tax_ids'] and isinstance(aml_dict['tax_ids'][0], (int, long)): # Transform the value in the format required for One2many and Many2many fields aml_dict['tax_ids'] = map(lambda id: (4, id, None), aml_dict['tax_ids']) + if any(line.journal_entry_ids for line in self): + raise UserError(_('A selected statement line was already reconciled with an account move.')) # Fully reconciled moves are just linked to the bank statement total = self.amount