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

I want to hide my events page to only people who are portal and internal users. how can i do this.

아바타
취소
베스트 답변

Hi,


The function shown below can be used to hide menus on websites:


    def _compute_visible(self):

        super()._compute_visible()

        self.env.registry.clear_cache('templates')

        for menu in self:

            visible = True

            if menu.name == 'Events':  # Assuming 'Events' is the name of your events page menu

                if self.env.user.has_group('base.group_portal') or not self.env.user.share:

                    visible = False

            menu.is_visible = visible


Hope it helps

아바타
취소
작성자

Thanks. Does this work on the odoo online version

관련 게시물 답글 화면 활동
0
10월 24
1836
0
5월 24
3499
3
3월 15
9518
4
5월 25
3133
0
8월 24
1269