Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
8081 มุมมอง

Hi, i want to show record in object res.users only user with the same login. i have use this code for record rules

[('user_id','=', user.id)] but its doesnt work and users not show with error message


AccessErrorThe requested operation cannot be completed due to security restrictions. Please contact your system administrator.(Document type: res.users, Operation: read)

Anyone can help me please? how i solve this problem.Thanks before

อวตาร
ละทิ้ง

Susi,
Is field user_id exist in your object?
on which object are u trying to keep this rule?

คำตอบที่ดีที่สุด

use domain force and apply it's condition given in below.for showing only his record

[('id','=',user.id)]



อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hi Pawan,

i just realized field user_id doesnt exist in res.users.

how can i solved this?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Rule seems correct, hope the problem is the logged-in user don't have the access right to read res.users object. Please check access rules of res.users object for that user role.


Hope this helps.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Record Rule แก้ไขแล้ว
1
มิ.ย. 16
3911
1
พ.ค. 16
4823
1
ม.ค. 16
4548
1
ก.ค. 19
585
2
ก.ค. 17
3158