i want to use one field in 'hr.contract' module to 'hr.employee' module.
field name in 'hr.contract' is type_id. i want to use this field in 'hr.employee' .
is this correct?
from openerp import models, fields, api, _
class Hremployee(models.Model):
_inherit=['hr.employee','hr.contract']
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="employee_registration_form_view1234">
<field name="name">Employee Registration</field>
<field name="model">hr.employee</field>
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_employee_form" />
<field name="arch" type="xml">
<xpath
expr="//form/sheet/div[@class='oe_title']/field[@name='work_phone']"
position="after">
<label for="employee" />
<field name="employee" />
</xpath>
<xpath
expr="//form/sheet/div[@class='oe_title']/field[@name='employee']" position="after">
<label for="type_id" />
<field name="type_id" />
</xpath>
</field>
</record>
<act_window name="Employee" domain="[('employee', '=', True)]"
res_model="hr.employee" context="{'default_employee': True}" id="employee_action1234" view_mode="tree,form"/>
<menuitem name="Add Employee" id="add_e6hjfgjf1234" parent="check_sub_menu"
action="employee_action1234">
</menuitem>
</data>
</openerp>