Merge PR #2673 into 14.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2023-11-17 19:31:52 +00:00

View File

@@ -56,7 +56,7 @@ class ResUsers(models.Model):
self, type_message=DEFAULT, message=DEFAULT_MESSAGE, title=None, sticky=False
):
# pylint: disable=protected-access
if not self.env.user._is_admin() and any(
if not (self.env.user._is_admin() or self.env.su) and any(
user.id != self.env.uid for user in self
):
raise exceptions.UserError(