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

I want to make a field readonly in edit mode and editable in create mode in openerp. I want a field for which value is specified while creating and later it should not be changed.

This is my code:

<field name = "apply_to_future" class="oe_edit_only" attrs="{'readonly':[('status','=','Draft')]}" />

 

Thanks in advance

아바타
취소
베스트 답변

Have you tried including ID in the view and set the attrs="{'readonly':[('id','>',0)]}" ?

아바타
취소
작성자 베스트 답변

Thanks Ivan,

We got, 

attrs="{'readonly':[('pay_value','!=',False)]}"

아바타
취소
작성자

attrs="{'readonly':[('pay_value','!=',False)]}"