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

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

By
Alcaline
on 7/23/14, 5:28 AM 635 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')]}"/>

 

4

Dhinesh - Technical Consultant, Sodexis Inc

--Dhinesh - Technical Consultant, Sodexis Inc--
3577
| 5 4 9
Pondicherry, India
--Dhinesh - Technical Consultant, Sodexis Inc--

Passionate coder in Python/OpenERP. Knows Django/Flask MVC frameworks. Did code in Java, PHP.

Contact me at: dvdhinesh.mail@gmail.com

Dhinesh - Technical Consultant, Sodexis Inc
On 7/23/14, 5:36 AM

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.

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

1 follower(s)

Stats

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