Skip to content

Commit

Permalink
⬆️ ir_rule_protected: port to v17
Browse files Browse the repository at this point in the history
  • Loading branch information
yelizariev committed Dec 15, 2023
1 parent 7f311b8 commit 12f2463
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ir_rule_protected/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def check_restricted(self):
return
for r in self:
if r.protected:
raise exceptions.Warning(
raise exceptions.UserError(
_("The Rule is protected. You don't have access for this operation")
)

Expand All @@ -35,5 +35,5 @@ class Module(models.Model):
def button_uninstall(self):
for r in self:
if r.name == MODULE_NAME and self.env.uid != SUPERUSER_ID:
raise exceptions.Warning(_("Only admin can uninstall the module"))
raise exceptions.UserError(_("Only admin can uninstall the module"))
return super(Module, self).button_uninstall()

0 comments on commit 12f2463

Please sign in to comment.