OpenERP - How do I remove the Save and Remove button from my view?

How can I remove the Save and Remove links from my view? I created a very basic view, but the default Save and Discard buttons. Please see the image.

enter image description here

+3


source to share


2 answers


It's actually pretty easy to accomplish.

If you want to hide the button Create

, and Import

in the tree view, use create="false"

in determining the tag tree:

<record id="your_id" model="ir.ui.view">
    <field name="name">your.model.tree</field>
    <field name="model">your.model</field>
    <field name="arch" type="xml">
        <tree string="Your model" create="false">
                <!-- Your fields-->
        </tree>
    </field>
</record>

      



If you want to hide buttons Save

, Edit

and Discard

in the form view, use create="false"

also edit="false"

in the form tag definition:

<record id="your_id" model="ir.ui.view">
    <field name="name">your.model.form</field>
    <field name="model">your.model</field>
    <field name="arch" type="xml">
        <form string="Your model" create="false" edit="False">
            <!-- Your fields -->
        </form>
    </field>
</record>

      

+3


source


In your ir.actions.act_window

xml entry add this line

<field name="target">inline</field>

      



I know this is an old question. Just in case, someone ruined this question and came across this.

+1


source







All Articles