[IMP] account_move_protect_deleting : change validated to posted after review
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"maintainer": "Boris Gallet",
|
||||
"license": "AGPL-3",
|
||||
"category": "Tools",
|
||||
"summary": "Forbid to delete an account move that has already been validated",
|
||||
"summary": "Forbid to delete an account move that has already been posted",
|
||||
# any module necessary for this one to work correctly
|
||||
"depends": [
|
||||
"base",
|
||||
|
@@ -19,5 +19,5 @@ msgstr ""
|
||||
#. odoo-python
|
||||
#: code:addons/account_move_protect_deleting/models/account_move.py:0
|
||||
#, python-format
|
||||
msgid "You cannot delete this account move because it has been validated."
|
||||
msgstr "Vous ne pouvez pas supprimer cette pièce comptable car elle à déjà été validée."
|
||||
msgid "You cannot delete this account move because it has been posted."
|
||||
msgstr "Vous ne pouvez pas supprimer cette pièce comptable car elle à déjà été confirmée."
|
@@ -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