mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[10.0][FIX] User group not updating when removing a user from the role view
This commit is contained in:
committed by
Jesús Alan Ramos Rodríguez
parent
9b43d67edf
commit
d32b8f4d3c
@@ -85,3 +85,10 @@ class ResUsersRoleLine(models.Model):
|
|||||||
date_to = fields.Date.from_string(role_line.date_to)
|
date_to = fields.Date.from_string(role_line.date_to)
|
||||||
if today > date_to:
|
if today > date_to:
|
||||||
role_line.is_enabled = False
|
role_line.is_enabled = False
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def unlink(self):
|
||||||
|
users = self.mapped('user_id')
|
||||||
|
res = super(ResUsersRoleLine, self).unlink()
|
||||||
|
users.set_groups_from_roles()
|
||||||
|
return res
|
||||||
|
|||||||
Reference in New Issue
Block a user