콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4249 화면

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.

아바타
취소