質問

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"]]
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top