Odoo Help


how to remove fields from inherit table ? [Closed]

on 3/18/13, 6:04 AM 6,229 views

The Question has been closed

on 04/20/2013 03:22:43

in my model class i inherit hr.employee model.but i not need some fields from that model.how to remove those fields.?

class madulsima_plucker(osv.osv):
    _name = "madulsima.plucker"
    _description = "This table is for keeping personal data of madulsima pluckers"
    _inherit = "hr.employee"
    _columns = {
        'reg_no': fields.char('Registration Number', size=256, required=True),
        'worker_name': fields.char('Worker Name', size=256, required=True)


<?xml version="1.0"?>
        <!-- 1st part of the sim_view start -->
        <record model="ir.ui.view" id="madulsima_plucker_form">
            <field name="name">madulsima.plucker.form</field>
            <field name="model">madulsima.plucker</field>
            <field name="inherit_id" ref="hr.view_employee_form" />
            <field name="type">form</field>
            <field name="arch" type="xml">
                <notebook position="inside">
                    <page string="Madulsima Plucker Fields">
                        <field name="reg_no" />
                        <field name="worker_name" />
                        <field name="ssnid" position="replace" />
                        <field name="sinid" position="replace" />

        <record model="ir.actions.act_window" id="action_plucker_registration">
            <field name="name">Plucker Registration</field>
            <field name="res_model">madulsima.plucker</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>

        <menuitem id="menu_madulsima_plucker" name="Madulsima/Checkroll" />

        <menuitem id="menu_madulsima_plucker_registration" name="Plucker Registration"
            parent="menu_madulsima_plucker" action="action_plucker_registration" />

and i also try with view.xml for remove those fields as per developer book.its not worked.where is my issue .?


Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--

| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 3/18/13, 6:16 AM


you have 2 possibilities example field ssnid in hr employee:

replace (not good for me) :

            <xpath expr="/form/notebook/page/group/field[@name='ssnid']" position="replace"> 

field becomes just invisible :

            <xpath expr="/form/notebook/page/group/field[@name='ssnid']" position="attributes"> 
                <attribute name="invisible">True</attribute>


thanks GEM.u helped me a lot :-)

on 3/18/13, 6:25 AM

I think the Q is

How to delete it using inherted class ??

walid redwan
on 12/29/16, 5:48 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

0 follower(s)


Asked: 3/18/13, 6:04 AM
Seen: 6229 times
Last updated: 7/12/17, 2:37 PM