【发布时间】:2017-07-11 14:10:17
【问题描述】:
<openerp>
<data>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//span[@t-field='t.amount']" position="after">
<span t-field="t.note"/>
</xpath>
</template>
</data>
</openerp>
我在税表内的发票报告中添加了字段。但是我怎样才能使税表只有在有注释字段时才可见,如果注释为空则隐藏。
我尝试使用 t-if 进行某些操作,但我的目标是在注释字段不为空时显示税表而不是隐藏它。有没有任何类型的 t-ifnot?
<xpath expr="//span[@t-field='t.amount']/../../../../thead/tr" position="replace">
<th t-if="o.notes"
</xpath>
【问题讨论】: