I was trying to add a extra field in hr module i.e in hr.employee object by inheritance but when I'm adding that field ,in Hr module employee form my given field is not displayed .So pls help. All I want to do is create another seperate module so whenever that module is installed then that column should appear.(my field jdate should appear after coach_id field)
class joining_date(osv.osv):
_name="joining.date"
_inherit = "hr.employee"
_columns={
'jdate':fields.date('Joining date'),
}
joining_date()
xml part:
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="view_join_date" model="ir.ui.view">
<field name="name">Join_date</field>
<field name="model">joining.date</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//form/sheet/notebook/page/group[1]/group[2][@name='coach_id']" position="after">
<field name="jdate"/>
</xpath>
</data>
</field>
</record>
openerp file:
{
'name': 'HR join date',
'version': '1.0',
'category': 'Tools',
'description': """ To add extra join date field""",
'author': 'Greywind',
'website': 'http://www.greywind.com',
'depends': ['hr','base', 'account_accountant'],
'data': [
'joindate_view.xml'],
'demo': [],
'installable': True,
'auto_install': False,
}