[IMP] account_move_protect_deleting : change validated to posted after review

This commit is contained in:
Boris Gallet
2024-03-28 09:23:42 +01:00
parent 69b8e46925
commit 1b09ad77b6
3 changed files with 8 additions and 8 deletions

View File

@@ -5,11 +5,11 @@ class AccountMove(models.Model):
_inherit = 'account.move'
@api.ondelete(at_uninstall=False)
def _check_name(self):
""" Prevent deletion of a account move if it has been posted "/"
def _check_posted(self):
""" Prevent deletion of a account move if it has been posted
"""
if (self.posted_before) :
if (self.posted_before):
raise UserError(_(""
"You cannot delete this account move because it has been validated."
))
"You cannot delete this account move because it has been posted."
))