How to inherit model & remove unwanted fields OpenERP.?

Syndicate-Raw

New Member
in my model class i inherit hr.employee model.but i not need some fields from that model.how to remove those fields.?\[code\]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) }madulsima_plucker()\[/code\]and i also try with view.xml for remove those fields as per developer book.its not worked.where is my issue .?\[code\]<?xml version="1.0"?><openerp> <data> <!-- 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" /> </page> </notebook> </field> </record> <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> </record> <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" /> </data></openerp>\[/code\]
 
Back
Top