This question has been flagged
1 Reply
3459 Views

I have some code:

<tree colors="red:value_id!='' and mandatory==True">
             <field name="mandatory"/>
             <field name="attribute_id"/>
            <field name="value_id"/>
</tree>

Whatever if value_id is set, or not it is always true! Did I something wrong?

Avatar
Discard
Author Best Answer

Ok. I solved it.

<tree colors="red: not value_id and mandatory">
         <field name="mandatory"/>
         <field name="attribute_id"/>
        <field name="value_id"/>
</tree>

instead != I should use 'not'

Avatar
Discard