From afc6eaf9474cb1fd0ddf1f55119240c42ec665e2 Mon Sep 17 00:00:00 2001 From: Pierrick Brun Date: Tue, 29 Jan 2019 14:27:05 +0100 Subject: [PATCH] Revert "[FIX] Crash in base_user_role when role_id is not set on res.users.role.line" This reverts commit b537941d5a2d1fcb3fbacc602124c1b3f6e1d495. --- base_user_role/models/user.py | 3 +-- base_user_role/views/user.xml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/base_user_role/models/user.py b/base_user_role/models/user.py index 0aad84965..2346ae94d 100644 --- a/base_user_role/models/user.py +++ b/base_user_role/models/user.py @@ -70,8 +70,7 @@ class ResUsers(models.Model): lambda rec: rec.is_enabled) for role_line in role_lines: role = role_line.role_id - if role: - group_ids += role_groups[role] + group_ids += role_groups[role] group_ids = list(set(group_ids)) # Remove duplicates IDs groups_to_add = list(set(group_ids) - set(user.groups_id.ids)) groups_to_remove = list(set(user.groups_id.ids) - set(group_ids)) diff --git a/base_user_role/views/user.xml b/base_user_role/views/user.xml index a2582caf2..9a914625d 100644 --- a/base_user_role/views/user.xml +++ b/base_user_role/views/user.xml @@ -13,7 +13,7 @@ - +