I have Base theme called theme_test Here is the template code(this template is added in manifest's data).
<template id="product_catg_test" name="Product Category">
<t t-if="categories">
<code for print category>
</t>
</template>
So I have created an extended module called test_theme_extended and tried two inherit approach to replace the t-if condition
- First Approach(I added this file in data in the manifest)
<template id="product_catg_test_extended" inherit_id="theme_test.product_catg_test" name="Test">
<xpath expr="//t[@t-if='categories']" position="replace"></xpath>
</template>
This first approach gives me an error
odoo.tools.convert.ParseError: "Element '' cannot be located in parent view
- Second Approach(I added this file in QWEB in the manifest)
<t t-extend="theme_test.product_catg_test">
<t t-jquery="t[t-if='categories']" t-operation="replace"/>
</t>
This also not working.
I am thinking that the main view created from the theme and it has no external ID that's why I face this issue. But how can I inherit the base theme view in extended module?