Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2978 Lượt xem

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>
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 6 25
1600
4
thg 5 24
5777
1
thg 5 23
3631
0
thg 3 16
2924
1
thg 5 15
4620