0
votes

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

2
no it wont break coz we r using regex [[]] but this is strange did you check ur rml? try to print this field some where else without any other regex (condition)Senthilnathan

2 Answers

1
votes

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.
1
votes

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.