Skip to Content
Menu
This question has been flagged
1 Reply
2489 Views

I have a website menu defined by this code:

<record id="website_menu_apps" model="website.menu">
            <field name="name">Apps</field>
            <field name="url">/apps</field>
            <field name="parent_id" ref="website.main_menu" />
            <field name="sequence" type="int">19</field>

</record>


and a field defined by this code:

class Website(models.Model):
    _inherit = 'website'

    dedicate_apps_store = fields.Boolean(string='Dedicated Apps Store', default=True)


how can I make website menu disappear when user set website.dedicate_apps_store to False?

I did re-create website menu for the deadline, but just want a decent answer for the future. Any help would be appreciated!

Avatar
Discard
Best Answer

See the below module. The above module display or hide menu based on user login conditions. You can get idea, based on your requirements can modify.

https://apps.odoo.com/apps/modules/11.0/website_menu_by_user_status/

 

Avatar
Discard
Related Posts Replies Views Activity
5
Aug 24
42964
2
Apr 24
948
3
Jun 23
3114
2
Jun 23
2357
3
Mar 23
8618