[FIX] hr : Fixes the problem on copy method of hr department object

lp bug: https://launchpad.net/bugs/988165 fixed

bzr revid: amp@tinyerp.com-20120425072409-ohl0xr62lszadhnm
This commit is contained in:
Amit (OpenERP)
2012-04-25 12:54:09 +05:30
parent e9f015e217
commit 76066c62c5
+8 -1
View File
@@ -283,7 +283,14 @@ class hr_department(osv.osv):
'manager_id': fields.many2one('hr.employee', 'Manager'),
'member_ids': fields.one2many('hr.employee', 'department_id', 'Members', readonly=True),
}
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default = default.copy()
default.update({'member_ids': []})
return super(hr_department, self).copy(cr, uid, id, default, context=context)
hr_department()