From ec1af85ddc86b9edd6699085f176cfe234eae6fc Mon Sep 17 00:00:00 2001 From: Laurent Stukkens Date: Mon, 29 Jul 2024 11:13:17 +0200 Subject: [PATCH] [FIX] base_user_role: prevent crash when using 'res.users' (x2m) fields in forms --- base_user_role/models/user.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base_user_role/models/user.py b/base_user_role/models/user.py index aec70a468..9ad15f1d8 100644 --- a/base_user_role/models/user.py +++ b/base_user_role/models/user.py @@ -11,12 +11,14 @@ class ResUsers(models.Model): inverse_name="user_id", string="Role lines", default=lambda self: self._default_role_lines(), + groups="base.group_erp_manager", ) role_ids = fields.One2many( comodel_name="res.users.role", string="Roles", compute="_compute_role_ids", compute_sudo=True, + groups="base.group_erp_manager", ) @api.model