跳至内容
菜单
此问题已终结
2958 查看

I added field note to invoice report inside tax table. i want tax table to show up only if field note filled up. 

getting this error.  but field does exist and works wine if i don't use last xpath with position=replace.

QWebException: "'NoneType' object has no attribute 'note'" while evaluating

'not t.note'

<openerp>
<data>

<template id="report_invoice_document" inherit_id="account.report_invoice_document">


<xpath expr="//span[@t-field='t.amount']/../../../../thead/tr" position="inside">
<th class="text-left">Note</th>

</xpath>

<xpath expr="//span[@t-field='t.amount']" position="after">
<span t-field="t.note"/>
</xpath>
          <xpath expr="//span[@t-field='t.amount']/../../../.." position="replace">
<th t-if="not t.note"/>
</xpath>


</template>
</data>
</openerp>
形象
丢弃
相关帖文 回复 查看 活动
2
6月 25
1530
4
5月 24
5741
1
5月 23
3608
0
3月 16
2893
1
5月 15
4591