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

Well. im using odoo 16


I would like some assistance on creating a record rule for this event, i was trying to create a OWN CONTACTS rule, on the contact module, like this :  [('user_id', '=', user.id)]
But when i put that in a record rule, my employee cant log in, he get this message.

Error message:

Due to security restrictions, you are not allowed to access 'User' (res.users) records.

Records: Employee#1 (id=11)
User: Employee#1 (id=11)

This restriction is due to the following rules:


Contact your administrator to request access if necessary.

Implicitly accessed through 'User' (res.users).


Ảnh đại diện
Huỷ bỏ
Tác giả

Also, i'm applying that domain rule to the res.partner module

Tác giả

Help? please

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

Hi 

Try to update the domain like this

< field
name = "domain_force" > [('create_uid', '=', user.id)] < / field >



Regards

Ảnh đại diện
Huỷ bỏ
Tác giả

Whenever i try this, the user cant create contacts because this error, and sometimes it cant login, here is the error : Access Error

Due to security restrictions, you are not allowed to access 'Contact' (res.partner) records.

Records: Chad Cruchley (id=120)
User: user1(id=12)

This restriction is due to the following rules:
- Own Contacts

Contact your administrator to request access if necessary.