@ -48,6 +48,13 @@ class ResUsersRole(models.Model):
self.update_users()
return res
@api.multi
def unlink(self):
users = self.mapped('user_id')
res = super(ResUsersRole, self).unlink()
users.set_groups_from_roles()
def update_users(self):
"""Update all the users concerned by the roles identified by `ids`."""