Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
8358 Представления

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. 

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
янв. 22
3480
5
дек. 23
27088
0
июн. 23
1776
2
дек. 22
22753
0
июл. 21
1987