Odoo Help


colors in tree view always return true

Tadeusz Karpiński
on 7/2/13, 10:46 PM 1,140 views

I have some code:

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

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

Tadeusz Karpiński
On 7/2/13, 11:11 PM

Ok. I solved it.

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

instead != I should use 'not'

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


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)


Asked: 7/2/13, 10:46 PM
Seen: 1140 times
Last updated: 3/16/15, 8:10 AM