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

How to hide and show a field based on the edit mode or view mode in odoo for example I want to show a field in one2many tree when the user click on edit or create button hide the field when the user click on save button view?


Your help is really appreciated

아바타
취소
베스트 답변

Hello,

To make the field appear only on edit/create you can use:

<field name="name" class="oe_edit_only"/>


Regards...

아바타
취소

Again... why is it not documented!? (Anyhow, thanks for the solution.)

베스트 답변

Hello

You can use the class oe_edit_ony


<div class="oe_edit_only">
  <field name="your_field/>
</div>


Take a look in res partner form, where "Is a company" is using this class !

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

Thanks but class="oe_edit_only" is not working when the field is in the one2many field  it will only disable it

아바타
취소