Search code examples
odooodoo-10odoo-website

How to remove toolbar from website for all users other than Admin in odoo 10


How can I remove the odoo default toolbar for public users? I mean I don't want any user (except for admin) after login to see the top blue bar which has options of discuss, employees etc..

Please refer the following image :

Website image


Solution

  • After research of 3 days, I was able to achieve this. Anyone who wants to do this may add the following code in your view.

    <template id="credirect.remove_header" inherit_id="website.user_navbar" name="Remove Header">
    <xpath expr="//nav[@id='oe_main_menu_navbar']" position="attributes">
    <attribute name="groups">base.group_erp_manager</attribute>
    </xpath>
    </template>