Browse Source

Revert "[FIX] Crash in base_user_role when role_id is not set on res.users.role.line"

This reverts commit b537941d5a.
pull/1489/head
Pierrick Brun 6 years ago
parent
commit
c6116c30ba
  1. 1
      base_user_role/models/user.py
  2. 2
      base_user_role/views/user.xml

1
base_user_role/models/user.py

@ -62,7 +62,6 @@ class ResUsers(models.Model):
lambda rec: rec.is_enabled)
for role_line in role_lines:
role = role_line.role_id
if role:
group_ids.append(role.group_id.id)
group_ids.extend(role.implied_ids.ids)
group_ids = list(set(group_ids)) # Remove duplicates IDs

2
base_user_role/views/user.xml

@ -13,7 +13,7 @@
<page string="Roles">
<field name="role_line_ids" nolabel="1">
<tree editable="bottom" decoration-muted="not is_enabled">
<field name="role_id" required="1"/>
<field name="role_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="is_enabled"/>

Loading…
Cancel
Save