如何在继承qweb中添加自定义文本?
例如,在Sale/view/report_saleorder.xml中
在class="oe_structure"下面我需要一张桌子
<p t-field="doc.note" />
<p t-if="doc.payment_term_id.note">
<span t-field="doc.payment_term_id.note"/>
</p>
<p t-if="not doc.payment_term_id and doc.partner_id.property_payment_term_id">
<span t-field="doc.partner_id.property_payment_term_id.note"/>
</p>
<p id="fiscal_position_remark" t-if="doc.fiscal_position_id and doc.fiscal_position_id.note">
<strong>Fiscal Position Remark:</strong>
<span t-field="doc.fiscal_position_id.note"/>
</p>
<div class="oe_structure"/>
<xpath expr="???" position="???">
<table><tr><td>CUSTOM TEXT</td></tr></table>
</xpath>发布于 2017-03-15 10:59:37
我不确定上面的xml是否是整个报告,但是您可以使用这样的东西。
<xpath expr="//div[@class='oe_structure'][last()]" position="after">
<!-- YOUR TABLE HERE -->
</xpath>这假设这是您正在继承的xml中oe_structure的最后一个实例。
https://stackoverflow.com/questions/42806998
复制相似问题