İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
5190 Görünümler

For example,
Like the below function,easily set the invisible function in ~addons/hr/views/*.xml
<field name="resign_date" attrs="{'invisible':[('resign_date', '=', '9000-12-31')]}"/>
but how to set the specific field to invisible in printed report in ~addons/hr/report/*.xml
<tr t-foreach="docs" t-as="l">
<td>
<span t-field="l.resign_date"/>
</td>
</tr>

Avatar
Vazgeç
En İyi Yanıt

Hi,

You can use t-if. 

<t t-if="your condition">
       <span t-field="l.resign_date"/>                       
</t>


Thanks & Regards

Avinash N K

Avatar
Vazgeç
Üretici

No matter the date is '9000-12-31' or not,still display in the printed report.What's the mistake of the code?

<td>

<t t-if="l.resign_date != '9000-12-31'">

<span t-field="l.resign_date"/>

</t>

</td>

İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Tem 23
30716
1
Tem 23
2639
1
Nis 22
7057
1
Şub 22
2665
2
Eyl 17
13996