Skip to Content
Menu
This question has been flagged
2 Replies
1774 Views

Hello,

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

Thanks in regards.

Avatar
Discard
Best Answer

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.

Avatar
Discard
Best Answer

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

Avatar
Discard