try this,
[[ (o.is_pk_branch==True and "Head Office") or "Head Office"]]
سؤال
I have a boolean field that I would like to show in the PDF if the value is 'TRUE' then print 'Head Office' but if 'False' then print 'Sub Branch'
<field name='is_branch'/>
in .sxw
[repeatIn(objects,'o')]]
[[(o.is_pk_branch=='TRUE') and 'Sub Branch' or 'Head Office']]
but in the PDF show just 'Head Office' Some one please help me .
المحلول
try this,
[[ (o.is_pk_branch==True and "Head Office") or "Head Office"]]