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
окт. 24
|
3399 | ||
|
|
0
мая 24
|
5998 | ||
|
|
3
мар. 15
|
11450 | ||
|
|
4
мая 25
|
5389 | ||
|
|
0
авг. 24
|
2602 |