Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2783 Переглядів

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?

Аватар
Відмінити
Найкраща відповідь

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.

Аватар
Відмінити
Автор

That does fix the issue, thank you!

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

Related Posts Відповіді Переглядів Дія
1
трав. 20
5626
4
лют. 24
6866
3
бер. 24
3144
2
січ. 24
3271
0
січ. 24
1568