Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
6 Antwoorden
13713 Weergaven

I want to hide the Home button from the navigation bar of Odoo12 website.
Not sure how to do that with code, can anyone help me out in this?
Thanks

Avatar
Annuleer
Auteur

Hi Mitul Shingala,

I am new to this so please can you help me out by the code.

I am updating my answer. please add the below code into your code. using that field you can achieve your goal.

Auteur

Hi Bouabaker Abdallah,

Its not working!

Beste antwoord

Try this in your XML file 


<?xml version="1.0" encoding="utf-8"?>
<odoo>
 <template id="my_header" inherit_id="website.layout" name="my_header">
        <xpath expr="//header" position="replace">
                    <header>
add your specific menu here
                   </header>
        </xpath>
</template>
 </odoo>

Avatar
Annuleer
Beste antwoord

Hello

you can do with add 'active' field into the object 'website.menu'

or using the 'is_visible' field available into the   website.menu object.

class website_menu(models.Model):

    _inherit = 'website.menu'

    active = fields.Boolean(string="Active", default=True) # if this field is mark as checked then it will visible into the menu

# inherit the xml view and add the field into the xml view also. so into the form view you can see the field and then try. 


Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
jan. 20
2669
3
mrt. 24
6823
1
mei 22
2868
0
dec. 19
2541
1
okt. 19
5635