Ibrahim Rahimi
Ibrahim Rahimi

Reputation: 539

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?

Upvotes: 2

Views: 1933

Answers (1)

Kenly
Kenly

Reputation: 26698

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

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

Upvotes: 2

Related Questions