I want to hide my events page to only people who are portal and internal users. how can i do this.
Această întrebare a fost marcată
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
Îți place discuția? Nu doar citi, alătură-te!
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
|
0
oct. 24
|
2882 | ||
|
|
0
mai 24
|
5113 | ||
|
|
3
mar. 15
|
10859 | ||
|
|
4
mai 25
|
4666 | ||
|
|
0
aug. 24
|
2158 |