Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2786 มุมมอง

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
5628
How to automate initial configuration? แก้ไขแล้ว
4
ก.พ. 24
6869
3
มี.ค. 24
3145
2
ม.ค. 24
3273
0
ม.ค. 24
1569