Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
2810 Visninger

I'm trying to hide records from users in the Documents/User group. I want to accomplish this by creating a custom boolean field and denying read access when this field is set to True. Unfortunately I've been unable to get it to work.

I'm sure that the problem lies with the domain.

[('x_is_protected', '=', True)] -> Apply for read: False

I recreated my problem using Odoo Studio, here. https://imgur.com/a/WxMX6hW


Any tips on using record rules the right way?

Avatar
Kassér
Bedste svar

I think your logic is the wrong way round.  The Record Rule should be:

[('x_is_protected', '=', False)] -> Apply for read 

So users in that group only have access to records that aren't protected.

Avatar
Kassér
Forfatter

That does fix the issue, thank you!

I don't understand why it must be this way though, the logic seems equivalent.

Related Posts Besvarelser Visninger Aktivitet
1
maj 20
5648
4
feb. 24
6918
3
mar. 24
3188
2
jan. 24
3292
0
jan. 24
1580