[IMP] hr: show the employees from the category

bzr revid: stw@openerp.com-20111026150324-1c5k1lsq2yvqhfq9
This commit is contained in:
Stephane Wirtel 2011-10-26 17:03:24 +02:00
parent 33a6d24bcd
commit 06b8d1e5c3
2 changed files with 4 additions and 1 deletions

View File

@ -47,7 +47,8 @@ class hr_employee_category(osv.osv):
'name': fields.char("Category", size=64, required=True),
'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
'parent_id': fields.many2one('hr.employee.category', 'Parent Category', select=True),
'child_ids': fields.one2many('hr.employee.category', 'parent_id', 'Child Categories')
'child_ids': fields.one2many('hr.employee.category', 'parent_id', 'Child Categories'),
'employee_ids': fields.many2many('hr.employee', 'employee_category_rel', 'category_id', 'emp_id', 'Employees'),
}
def _check_recursion(self, cr, uid, ids, context=None):

View File

@ -287,6 +287,8 @@
<form string="Employee Category">
<field name="name" />
<field name="parent_id" />
<separator string="Employees" colspan="4" />
<field name="employee_ids" colspan="4" nolabel="1" />
</form>
</field>
</record>