Odoo Help


what is DOMAIN?? how to hide fields using DOMAIN?? Please give me a simple example.

on 7/23/14, 5:28 AM 839 views

I've got a two fields.selection: institutional and retail this 2 need to hide in view_form. They will become visible if they undergo to the process of this two attrs="{'invisible':[('customer_group_id','=','Retail'), attrs="{'invisible':[('customer_group_id','=','Institutional').

How will i going to hide this using domain??

     <field name ="institutional" attrs="{'invisible':[('customer_group_id','=','Retail'), (]}"/>
     <field name ="retail" attrs="{'invisible':[('customer_group_id','=','Institutional')]}"/>



Hi, Domains are tuples, the structure is (field, operator, value). You can also give multiple tuples as list of tuples like [(field, operator, value), (field, operator, value), (field, operator, value)]

Field is the data in the database, Operator is the comparison, = equal, != not equal, > greater than, < less than, etc. Value is the data you want to compare with the field, it can be another database field, a constant or a calculated value.

These links will give more info about domains... link1 link2

Go to server/openerp/osv/expression.py in Openerp 7 to find the list of operators.

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

1 follower(s)


Asked: 7/23/14, 5:28 AM
Seen: 839 times
Last updated: 3/16/15, 8:10 AM