コンテンツへスキップ
メニュー
この質問にフラグが付けられました
6 返信
13834 ビュー

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. 


アバター
破棄
関連投稿 返信 ビュー 活動
0
1月 20
2756
3
3月 24
6934
1
5月 22
2915
0
12月 19
2601
1
10月 19
5685