Odoo Help

0

What is the correct syntax for an "if" request ?

By
Anne-Sylvie Burri
on 9/23/13, 7:20 AM 659 views

Hi everybody,

I'm trying to add an "if" request in my invoice report but I can't find the correct syntax.

I just wanna make a text appear if a boolean field is "True". If this field isn't check, then no text appear.

Now my code is the following :

[[ (o.materiel=='True') and 'Réserve de propriété...' ]]

Someone could help me ?

Many thanks in advance.

JMB

0
Andreas Brueckl
On 9/23/13, 7:25 AM

Try this:

   <para>[[ o.materiel and 'Réserve de propriété...' or removeParentNode('para') ]]</para>

Thanks for your answer. I just tried this but it doesn't work, nothing appear.

J.-M. Burri - Bureau ing.-conseils informatique, Anne-Sylvie Burri
on 9/23/13, 7:30 AM

Sorry it works ! I just made a little mistake when I have written your code.

J.-M. Burri - Bureau ing.-conseils informatique, Anne-Sylvie Burri
on 9/23/13, 7:39 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 9/23/13, 7:20 AM
Seen: 659 times
Last updated: 3/16/15, 8:10 AM