Odoo Help


Is it possible to hide a field in create new customer in open erp

on 1/7/14, 7:35 AM 1,943 views

hi I'm new to OpenERP. I'm using Sales Management and Accounting and Finance module's. I want to hide " JobPosition " field in the form where one can create a new customer.


René Schuster

--René Schuster--
| 5 5 8
Weinheim, Germany
--René Schuster--

Challenge Everything!

René Schuster
On 1/7/14, 7:47 AM

Try inheriting the view in a new xml file:

<record id="res_partner_x" model="ir.ui.view">
        <field name="name">res.partner.form</field>
         <field name="model">res.partner</field>
         <field name="inherit_id" ref="base.view_partner_form"></field>
         <field name="arch" type="xml"> 
                <xpath expr="//field[@name='function']"" position="replace">
                       <field name="function" placeholder="e.g. Sales Director"
                       attrs="{'invisible': [('is_company','=', True)]}" 

This way, the field will also be invisible while in edit-mode.

Another suggestion would be to make the field readonly.

<field name="function" placeholder="e.g. Sales Director"
       attrs="{'invisible': [('is_company','=', True)]}" 

This way the field will be visible but not editable.

@Rene Schuter : Thank's alot. I'm new to this OpenERP. Can u please tell me cleary which file i should inherit and where should i place the new xml file and after writing the new xml what is the procedure to make it work properlly. If you could give me a link to follow the step it would be a great help for me.

on 1/8/14, 1:34 AM


Try this tutorial and get familiar with the basics of OpenERP.

René Schuster
on 1/8/14, 4:51 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/7/14, 7:35 AM
Seen: 1943 times
Last updated: 3/16/15, 8:10 AM