Skip to Content
Menu
This question has been flagged
1 Odpoveď
127 Zobrazenia

When I try to log in with a test user in my custom Odoo module, I get this error:

Sorry, test1 (id=8) doesn’t have ‘read’ access to: User (res.users)

I have already given read access to both res.partner and res.users models in my ACL file for that test user’s groups.

I also created record rules for the res.partner model so each group can only access partners of a specific type like student, staff, or faculty.

But still, I get this read access error for res.users when I try to log in.

Can someone explain why this happens even though read access is granted in ACLs, and how to fix it properly?

Avatar
Zrušiť
Best Answer

Hi,

The "read access to res.users" error during login, despite granting read access in ACLs, often stems from the login process requiring more than basic read permissions. Odoo needs to access specific fields and methods on res.users for authentication and setup.

Troubleshooting involves checking ACL inheritance (ensuring your group inherits from base.group_user), reviewing record rules for undue restrictiveness, identifying specific fields being accessed during login and granting access to them, and checking for method access restrictions. Temporarily granting global read access to res.users can help diagnose if restricted access is the root cause. Also, verify module dependencies and review any custom code modifications to the login process. Grant the minimum necessary permissions to avoid security vulnerabilities and thoroughly test after any changes.


Hope it helps

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
nov 20
5234
1
sep 16
4701
0
mar 15
3472
4
dec 23
40559
1
nov 24
3580