콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2870 화면

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
5716
4
2월 24
6980
3
3월 24
3235
2
1월 24
3354
0
1월 24
1597