Skip to Content
Menu
This question has been flagged
1 Reply
5248 Views

Hi,


I am having issues inheriting a template in Odoo 15. Basically I am trying to inherit a template and as far as I am aware I am following the documentation correctly but when I update the module I am not seeing any of my changes, but I am also not receiving any errors.

My 'custom_search_panel.xml' file:



    
            

                

Test


            

    


My manifest file (removed fields like name, author, installable, etc for readability here):

'depends': ['web'],
'data': [
'security/ir.model.access.csv'
],
'assets': {
'web.assets_qweb': [
'custom_product_search_panel/static/src/xml/custom_search_panel.xml',
],
},


Any suggestions would be greatly appreciated. I was receiving errors when the XPATH wasn't working, but then once I fixed it I stopped getting errors but I can't see any of the changes to the template I make when I load up my module. For clarity too: I am doing this inheritance in an independent module and then installing it, as I am using the template I am inheriting in a view in another module and would like to change it. 

Avatar
Discard
Author

For some reason my xml did not show above so here is the XML in my file:

<?xml version="1.0" encoding="utf-8"?>

<templates xml:space="preserve">

<t t-inherit="web.SearchPanel" t-inherit-mode="extension">
<xpath expr="//div[@class='o_search_panel']" position="replace">
<div class="o_search_panel" t-att-class="env.searchModel.searchPanelInfo.className">
<b>Test</b>
</div>
</xpath>

</t>

</templates>

Hello, you are missing owl="1" in the XML file after the t-inherit-mode

Best Answer

Please refer to the following code to achieve this

  

   

       

           

Avatar
Discard
Author

Hi, thanks for the response but I can't see your code. Would you be able to send it again please?

Related Posts Replies Views Activity
0
Jun 22
1432
2
Jan 22
2567
2
Mar 15
6419
1
Jan 24
1661
1
Dec 23
511