diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index 03af527359d..e2da2b9cf7b 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -26,10 +26,28 @@ import tools
from tools.translate import _
class hr_employee_category(osv.osv):
+
+ def name_get(self, cr, uid, ids, context=None):
+ if not len(ids):
+ return []
+ reads = self.read(cr, uid, ids, ['name','parent_id'], context)
+ res = []
+ for record in reads:
+ name = record['name']
+ if record['parent_id']:
+ name = record['parent_id'][1]+' / '+name
+ res.append((record['id'], name))
+ return res
+
+ def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context):
+ res = self.name_get(cr, uid, ids, context)
+ return dict(res)
+
_name = "hr.employee.category"
_description = "Employee Category"
_columns = {
'name': fields.char("Category", size=64, required=True),
+ 'complete_name': fields.function(_name_get_fnc, method=True, 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')
}
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index ca9cd3bc158..496e24bbb08 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -259,8 +259,7 @@
-
-
+