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

Hi

How can define for example: modifiers="{'readonly': [['state', 'not in, ['draft']]]}" for some fields from interface?

Thanks

아바타
취소

Cant get you.?

can you give more details, what exactly you want to do?

베스트 답변

You can define it on field in xml like this:

<field name="your_field" attrs="{'readonly': [['state', 'not in, ['draft']]]}"/>

아바타
취소
베스트 답변

From the interface, you can enter developper mode (upper right corner drop down uder the user name - must be admin, abot odoo, clieck on developper mode) then edit the view - good for testing. The issue with this approach is that when the module is updated your modification will disappear. 

If you want to go further search the documentations for view inheritance.

아바타
취소