跳至內容
選單
此問題已被標幟
1 回覆
166 瀏覽次數

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?

頭像
捨棄
最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
11月 20
5244
1
9月 16
4707
0
3月 15
3473
4
12月 23
40567
1
11月 24
3596