Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6899 มุมมอง

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. 

อวตาร
ละทิ้ง
ผู้เขียน

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

คำตอบที่ดีที่สุด

Please refer to the following code to achieve this

  

   

       

           

อวตาร
ละทิ้ง
ผู้เขียน

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มิ.ย. 22
2245
2
ม.ค. 22
3507
2
มี.ค. 15
7495
2
ธ.ค. 24
9017
1
ม.ค. 24
2901