تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
8437 أدوات العرض

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?

الصورة الرمزية
إهمال
أفضل إجابة

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. 

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يناير 22
3528
5
ديسمبر 23
27216
0
يونيو 23
1838
2
ديسمبر 22
22845
0
يوليو 21
2055