Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
8447 Visualizzazioni

My question relate to the extension of QWEB templates written in other modules, I found two ways to do it:

<template id="website.layout_footer_copyright" inherit_id="website.layout" name="Footer Copyright">

<xpath expr="//footer" position="inside"> </xpath>
</template>

and

<templates id="template">

<t t-extend="DebugWidget">
<t t-jquery="div.content" t-operation="append">
</t>
</t>
</template

By searching through the code in Odoo I found out that both methods were used, though only the second one is documented. Is there some situations where one is preferred to the other?

Avatar
Abbandona
Risposta migliore

it's similar to https://www.odoo.com/forum/help-1/question/difference-between-xpath-and-t-jquery-154454#answer-154505

server-side template rending use `inherit_id` while client-side template use t-extend. 

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
gen 22
3532
5
dic 23
27224
0
giu 23
1842
2
dic 22
22855
0
lug 21
2067