Hi everyone, I'm trying to develop a custom theme for my odoo (v13) website but I'm struggling to create templates using qWeb and calling odoo defined templates like:
<template id="template_header_custom" inherit_id="website.layout" name="Template Header Cutsom" active="True">
<xpath expr="//header//nav" position="replace">
<h1>Custom header</h1>
<div>
<t t-call="website.navbar_nav">
<t t-set="_nav_class" t-valuef="me-auto"/>
<!-- Menu -->
<t t-foreach="website.menu_id.child_id" t-as="submenu">
<t t-call="website.submenu">
<t t-set="item_class" t-valuef="nav-item"/>
<t t-set="link_class" t-valuef="nav-link"/>
</t>
</t>
</t>
</div>
</xpath>
</template>
As soon as I invoque a website addon template I get the following error (once I've loaded the theme, navigate to the website home):
Error Message:
load could not load template ValueError: View 'website.navbar_nav' in website 1 not found Template: website.layout Path: /t/html/body/div/header/div[2]/t
How am I supposted to load these templates so I can create a custom dynamic layout for my theme?
Hi, thanks for the quick replay.
Yes in fact I've checked the three points:
So I understand from your replay that I'm doing the process as expected but for some reason I don't get the desired output. Searching in the design_themes repo I also found this approach but didn't work either:
theme_models.py
__init__.py (under models subfolder)
__init__.py (main folder)
Any other ideas on how to debug this or any other workaround?
Thanks!