跳至內容
選單
此問題已被標幟
1 回覆
2796 瀏覽次數

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.

相關帖文 回覆 瀏覽次數 活動
1
5月 20
5632
4
2月 24
6881
3
3月 24
3155
2
1月 24
3281
0
1月 24
1572