Skip to Content
Menu
This question has been flagged

I'm trying to filter out a contact record.
For example the OdooBot contact/partner record - it will have id=2

I have created a new group:

'mcag

added my user: 

'user1' id=8

added access rights:

res.partner.mcagContact
(res.partner)
 read: ✅ write: ✅ create: - delete: -

added a record rule for the same model with the same permissions, with the domain:
['&', '&', ('id', '!=', 2), ('some_field_in_res_partner', '=', user.company_id.id), ('some_field_in_res_partner', '!=', False)]

why is the user still trying to access the record with id=2 if I specifically wrote in the domain that should be out? 


when I'm accessing contacts list I get: 

Access Denied by record rules for operation: read on record ids: [2], uid: 8, model: res.partner


What is wrong with the above, or how to solve this behaviour?Thanks! 

           

Avatar
Discard
Related Posts Replies Views Activity
2
Nov 24
1172
2
Mar 25
5699
1
Oct 24
2550
2
Jan 24
3060
0
Jan 24
1446