Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
6353 Vues

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
Ignorer
Auteur

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

Meilleure réponse

Please refer to the following code to achieve this

  

   

       

           

Avatar
Ignorer
Auteur

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

Publications associées Réponses Vues Activité
0
juin 22
1808
2
janv. 22
3159
2
mars 15
7135
2
déc. 24
7875
1
janv. 24
2335