Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
173 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Nov 20
5244
1
Sep 16
4707
0
Mar 15
3473
4
Des 23
40567
1
Nov 24
3596