Odoo - OpenERP - How to hide or disable create or edit button (option) of form or tree view?

Support
Support
5000
| 2 1 2
Asked on 7/4/15, 8:32 AM
0
vote
8985 Views

You can remove or hide the Create or Edit Button by adding attributes to your form or tree in view.xml file:

<record ...>

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

</record>

This way "Edit" and "Create" are removed from view for all Users.

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>

Support
Support
5000
| 2 1 2
Answered on 7/4/15, 8:35 AM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This forum is for HiTechnologia Employees & just Odoo general knowledge purpose only.

Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 7/4/15, 8:32 AM
Seen: 8985 times
Last updated: 7/4/15, 8:35 AM