[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:
+8
-1
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user