I want to hide my events page to only people who are portal and internal users. how can i do this.
Bu soru işaretlendi
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
Tartışma hoşunuza mı gidiyor? Sadece okumakla kalmayın, katılın!
Özel özelliklerden yararlanmak ve harika topluluğumuzla etkileşime geçmek için bugün bir hesap oluşturun!
Üye Ol| İlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
|---|---|---|---|---|
|
|
0
Eki 24
|
3404 | ||
|
|
0
May 24
|
6005 | ||
|
|
3
Mar 15
|
11464 | ||
|
|
4
May 25
|
5392 | ||
|
|
0
Ağu 24
|
2612 |