简体   繁体   中英

How to use OR condition in t-field in qweb template in Odoo 9?

I am working on a report template in Odoo 9 qweb template and I need to use OR logical operator in t-field to get data from one of the two fields that I want to print their value in my report. Can I use OR here in t-field or I should use t-if with different span tags?

The t-field directive can only be used when performing field access (ab) on a “smart” record (result of the browse method)

You need to use the conditional directive t-if as you said.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM