Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4251 Lượt xem

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')]}"/>

 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ