【发布时间】:2022-03-27 06:10:16
【问题描述】:
在 odoo 中,qweb 报告。我创建了一个继承报告,其目标是将 t-call 属性值从 internal_layout 更改为外部布局。我使用了下一个代码:
<template id="!!!!!!!!!!!!" inherit_id="!!!!!!!!!!!!!">
<xpath expr="//t[@t-call='web.internal_layout']" position="attributes">
<attribute name="attrs">{'t-call':'web.external_layout'}</attribute>
</xpath>
</template>
此代码不起作用,我想知道是否有办法插入同一报告的子部分。
<template id="!!!!!!!!!!!!!!!!!!" inherit_id="!!!!!!!!!!!">
<xpath expr="//t[@t-call='web.internal_layout']" position="replace">
<t t-call='web.external_layout'>
insert here original sub report
</t>
</xpath>
</template>
【问题讨论】: