Help

How to remove Save Button from form view

Closed
Avatar
priyankahdp

The question has been closed

by
Sudhir Arya (ERP Harbor Consulting Services)
on 05/02/2013 04:06:08

I used openerp version 7 & i created a form view.but its only used to display data .not to add / edit data.above 2 selection boxes for query records.

my requirement is need to remove save button from top left corner

screen

Avatar
Discard
1 Answer
19

You can use create="false" attribute in form tag. It will disable Create button from form view. You can use edit="false" to disable Edit button.

If you want to disable button from form view then use this:

<form create="false" edit="false">

If you want to disable button from tree view then use this:

<tree create="false">

You can use create=false to disable create option, write=false to disable edit option and delete=false to disable delete option.

9 Comments
Avatar
Discard
Avatar
laribi
-

Hello, Thank you Sudhir for your answer , i hope you know how to remove only the save button from a form. I should let the others and replace only this button (save). Thanks.

Avatar
veena vasudevan
-

how to disable an button log in as an non-admin user

Avatar
wilson zauma
-

this is a solutions interesting but what happen when you only wnat to hide this button for one group users. how can do it this??

Don't give them create access right. That's it.

Avatar
wilson zauma
-

Sorry Sudhir but you can show some example for to understand well, because i dont understand, thank for your time

Avatar
mmycool
-

How about if you want to prevent editing only when an object has changed state...e.g not to edit a purchase order that has been approved by a project manager?

Avatar
mmycool
-

How about if you want to prevent editing only when an object has changed state...e.g not to edit a purchase order that has been approved by a project manager?

Avatar
Hachem Chraiti
-
    <record id="view_statistic_cloud_form_methode" model="ir.ui.view">
  <field name="name">My First Form view</field>
  <field name="model">cloud.statistic</field>
  <field name="type">form</field>
  <field name="arch" type="xml">
    <form string="My First Form View" version="7.0" create="false" >
    <group col="4">
       <field name="meter"/>
       <field name="Max"/>
       <field name="Name"/>
       </group>
     </form>
 </field>

</record>

Avatar
Nicolás Mena
-

I've tried this on Odoo 11 but didn't work, any hint if the way to do this have changed?