Odoo Help

Welcome!

This community 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.

0

Problem with "if" syntax in report

By
Anne-Sylvie Burri
on 11/6/13, 5:20 AM 558 views

Hi everybody,

I have a problem with the "if" syntax for a report. Here is my code :

[[ (o.partner_id.np==True and 'Notify Party' or '') ]]

[[ (o.partner_id.np==True and (o.partner_id.npname)) ]]
[[ (o.partner_id.np==True and (o.partner_id.npstreet)) ]]
[[ (o.partner_id.np==True and (o.partner_id.npstreet2)) ]]
[[ (o.partner_id.np==True and (o.partner_id.npzip)) ]] [[ (o.partner_id.np==True and (o.partner_id.npcity)) ]]
[[ (o.partner_id.np==True and (o.partner_id.npstate.name)) ]]
[[ (o.partner_id.np==True and (o.partner_id.npcountry.name)) ]]
[[ (o.partner_id.np==True and (o.partner_id.npphone)) ]]
[[ (o.partner_id.np==True and (o.partner_id.npfax)) ]]
[[ (o.partner_id.np==True and (o.partner_id.npemail)) ]]

I really don't understand why the first and second lines appear correctyl but after that only the code appear.

Maybe someone could help me ?

Thanks in advance.

JMB

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 11/6/13, 5:20 AM
Seen: 558 times
Last updated: 3/16/15, 8:10 AM