Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
6 ตอบกลับ
13898 มุมมอง

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
2817
Odoo Selection field issue แก้ไขแล้ว
3
มี.ค. 24
6987
Get selected value of selected field? แก้ไขแล้ว
1
พ.ค. 22
2941
0
ธ.ค. 19
2657
1
ต.ค. 19
5706