From 0ace060fc1c3f70d1a058eeb7a47b5dcec9fcf0e Mon Sep 17 00:00:00 2001 From: Pratik Awasthi Date: Thu, 13 Oct 2022 10:26:49 +0000 Subject: [PATCH] [FIX] base: display `Other` category in warning message if debug=false Before this commit, when the user changes the access rights of another user, he will see a warning message the other access rights will change with his changes. In that warning message, `Other` category could be displayed and that category is only displayed in the user form view if the user is in debug mode since it is a Technical category. This commit hides the `Other` category in the warning message when the user is not in debug mode to be consistent with the visibility of that category in the form view. task-3049636 X-original-commit: 9998ec50652a0c9b66e5f2b2c0ef5ce30861b79f Part-of: odoo/odoo#118825 --- odoo/addons/base/models/res_users.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/odoo/addons/base/models/res_users.py b/odoo/addons/base/models/res_users.py index 971366c36e1..32ab0811172 100644 --- a/odoo/addons/base/models/res_users.py +++ b/odoo/addons/base/models/res_users.py @@ -1635,7 +1635,8 @@ class UsersView(models.Model): missing_implied_groups = missing_implied_groups.filtered( lambda g: g.category_id not in (group.category_id | categories_to_ignore) and - g not in current_groups_by_category[g.category_id] + g not in current_groups_by_category[g.category_id] and + (self.user_has_groups('base.group_no_one') or g.category_id) ) if missing_implied_groups: # prepare missing group message, by categories