Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4540 Lượt xem

I have restricted access to users in the Contact app. I only want them to see contacts they created so I added the record rule below:

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

But when the user views a contact (that they created) the following error message appears:

"

Due to security restrictions, you are not allowed to access 'Contact' (res.partner) records. Records: feryialmangou (id=7) User: feryialmangou (id=6) This restriction is due to the following rules: - Contact Restriction User Contact your administrator to request access if necessary.

"



How do I make it so that the error message does not appear? As it gets annoying for the users. 

Ảnh đại diện
Huỷ bỏ

This doesn't fix the issue. I still see the same access error message. 

Câu trả lời hay nhất

Hi Feryial,


Try to replace your record rule with this rule it helps to show only ones created by the user.


Change:

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

To:

['|',('user_id','=',user.id),('user_id','=',False)]


Best Regards.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You will have to take the chatter section into consideration as well. Any follower on a contact not accessible to the user has the potential to break the the view. Same goes for any related contact (for example a sub-contact (an individual) within a company-type contact).

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 1 25
2367
3
thg 1 24
1900
0
thg 3 21
68
1
thg 12 20
7190
0
thg 8 19
3737