lundi 29 décembre 2014

if statement openerp view

What I want is to make an if statement. if it's true an image should be displayed, else the other image should be displayed. However the XML can't do the comparison because it can't find myboolean or it just can't compare the values so it's neither false or true.


Can someone explain it?


I also tried myboolean.raw_value === true but it gives me the error:



Uncaught TypeError: Cannot read property 'raw_value' of undefined



What I wanted to happen:



<if myboolean == true>
<img src="thisimage"/>
</if>
<if myboolean == false>
<img src="otherimage"/>
</if>

Aucun commentaire:

Enregistrer un commentaire