Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
6 Ответы
13571 Представления

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

Аватар
Отменить
Автор

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.

Автор

Hi Bouabaker Abdallah,

Its not working!

Лучший ответ

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>

Аватар
Отменить
Лучший ответ

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. 


Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
янв. 20
2591
3
мар. 24
6669
1
мая 22
2787
0
дек. 19
2480
1
окт. 19
5562