I try to make my own header on odoo 9 . for that i try to replace the current header using this :
<template id="new_header" inherit_id="website.layout">
<xpath expr="//header" position="replace">
<div>...</div>
</xpath>
</template>
but an error occurred saying :
Error details:
Element '<xpath expr="//header//a[@class='navbar-brand']">' cannot be located in parent view
Error context:
View `Show Logo`
[view_id: 348, xml_id: website.layout_logo_show, model: n/a, parent_id: 222]
None" while parsing None:50, near
<data inherit_id="website.layout">
<xpath expr="//header" position="replace">
<div>...</div>
</xpath>
</data>
can any body help me to do that. Thanks !
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
I found the solution for me...
There are two templates that inherent from website.layout and change somethings into the header :
1-Show logo
2-Show sign in
So to solve this problem u must either remove these two templates or if u don't want to make change into the website module u can try this :
<template priority="100" id="new_header" inherit_id="website.layout">
<xpath expr="//header" position="replace">
<div>customize ur new header...</div>
</xpath>
</template>
Hi
is coded in a new module that you create if that's it check the file __manifest__
'depends': ['website'],
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden