try this,
[[ o.state in ['draft','sent'] and removeParentNode('para')]]This offer is valid[[ o.x_reply_delay ]] days.
hope this will work for you.
Question
I have a integer field that I would like to show in the PDF quotation only if the sale order is in the quotation state.
It works already for other field, but this one does not, and I don't understand why.
Here is the line in the sxw report :
[[ o.state not in ['draft','sent'] and 'This offer is valid ']][[ o.x_reply_delay ]] days.
And this is my field in the xml declaration :
<field name="x_reply_delay"></field>
I can't understand why it works for other field and not this one. Having strings before and after the variable evaluation would break the evaluation of the condition ?
Thank you for your help
Cheers
Solution
try this,
[[ o.state in ['draft','sent'] and removeParentNode('para')]]This offer is valid[[ o.x_reply_delay ]] days.
hope this will work for you.
OTHER TIPS
As @Odedra suggested you need to remove the element in the case your order is not in the quotation state. Thus you discard the number and the word ´days' from the output. I would try in the following way:
[[ o.state in ['draft','sent'] and removeParentNode(´para´) ]]This offer is valid [[ o.x_reply_delay ]] days.