Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to hide a save button from inherited view????

By
Jihen BEN ALI
on 7/2/15, 3:44 AM 761 views

Hi,

I'm new in odoo and i need to know how to hide a save button from inherited form view??

Could you please help me

0
Jihen BEN ALI
On 7/2/15, 5:27 AM

I've tried it as you said to me but i'm still getting the save button

this is my code :


<record id="view_product_inherit_form" model="ir.ui.view">

<field name="name">product.inherit</field>

<field name="model">product.template</field>

<field name="inherit_id" ref="product.product_template_form_view"/>

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

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

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

</xpath>

</field>

</record>


0

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
4341
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 7/2/15, 4:12 AM

Jihen,

On the form view's form tag, you can specify create='false' which will disallow the end user to create a record.

<form string="somehing" create="false" edit="false" version="7.0">
If you inherit from an existing view:

<record>

.. 

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

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

</xpath> 

</record>

Thanks.

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!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/2/15, 3:44 AM
Seen: 761 times
Last updated: 7/2/15, 5:27 AM