تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
1397 أدوات العرض

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
1656
0
مايو 24
3210
3
مارس 15
9186
4
مايو 25
2883
0
أغسطس 24
1106