跳至内容
菜单
此问题已终结
1 回复
8393 查看

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
1月 22
3508
5
12月 23
27155
0
6月 23
1810
2
12月 22
22823
0
7月 21
2021