[IMP] use existing subscription method

bzr revid: mat@openerp.com-20130327165833-2qqwsxjhekywsosf
This commit is contained in:
Martin Trigaux 2013-03-27 17:58:33 +01:00
parent ccf6cf921e
commit 7801db8713
1 changed files with 1 additions and 2 deletions

View File

@ -230,8 +230,7 @@ class hr_employee(osv.osv):
# the user linked to the employee follow the employee
if 'user_id' in data:
user = self.pool.get('res.users').browse(cr, uid, data['user_id'], context=context)
self.message_subscribe(cr, uid, [employee_id], [user.partner_id.id], context=context)
self.message_subscribe_users(cr, uid, [employee_id], [data['user_id']], context=context)
return employee_id
def unlink(self, cr, uid, ids, context=None):