changeset cea778b779bb in modules/user_role:default
details: https://hg.tryton.org/modules/user_role?cmd=changeset;node=cea778b779bb
description:
Search users by roles using the proper role field
The fields roles is a One2Many so we must search on the target role
field.
issue9226
review305391003
diffstat:
res.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r e5e6c344031c -r cea778b779bb res.py
--- a/res.py Thu Mar 19 19:17:06 2020 +0100
+++ b/res.py Thu Apr 23 22:37:15 2020 +0200
@@ -21,7 +21,7 @@
super().write(*args)
users = User.search([
- ('roles', 'in', [r.id for r in roles]),
+ ('roles.role', 'in', [r.id for r in roles]),
])
User.sync_roles(users)