Skip to Content
Menu
This question has been flagged
1 Atsakyti
1455 Rodiniai

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

Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Autorius

Thanks. Does this work on the odoo online version

Related Posts Replies Rodiniai Veikla
0
spal. 24
1725
0
geg. 24
3302
3
kov. 15
9319
4
geg. 25
2959
0
rugp. 24
1160