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
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อ| Related Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
|---|---|---|---|---|
|
|
0
ต.ค. 24
|
3397 | ||
|
|
0
พ.ค. 24
|
5995 | ||
|
|
3
มี.ค. 15
|
11446 | ||
|
|
4
พ.ค. 25
|
5389 | ||
|
|
0
ส.ค. 24
|
2595 |