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

Hello,

I wanted to hide the create/edit option from the form view. Is it possible? If so how?

Thanks in regards.

아바타
취소
베스트 답변

HI Caroline Forbs,

Yes it is possible,

You can add the access right for that particular model and assign perm_create and perm_write column to 0 in the security file of ir.model.access.csv.

Or you can directly add the create="0"  write="0" in the form view tag from the xml side.



Hope it will help you.

아바타
취소
베스트 답변

Hi,

Yes you can.

You hide the edit/create button of the form view by adding attributes to your form in xml file:

<record ...>


   ...


   <form string="NAMEOFFORM" create="false" edit="false" version="7.0">


...


   </form>


</record>

In case you inherit from an existing view:

<record>


...


<field name="arch" type="xml">


   <xpath expr='//form[@string="Product"]' position='attributes'>


<attribute name="create">false</attribute>


   </xpath>


</field> ,


</record>


Regards

아바타
취소