[IMP] account_move_protect_deleting : change validated to posted after review
This commit is contained in:
@@ -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."
|
||||
))
|
||||
|
Reference in New Issue
Block a user