[FIX] res_user: de-duplicate usernames for warning msg about group deletion

bzr revid: odo@openerp.com-20110619130939-nnwi3u2ohl150mr6
This commit is contained in:
Olivier Dony 2011-06-19 15:09:39 +02:00
parent dd1cefe446
commit c46fa82418
1 changed files with 1 additions and 0 deletions

View File

@ -581,6 +581,7 @@ class groups2(osv.osv): ##FIXME: Is there a reason to inherit this object ?
if group_users:
user_names = [user.name for user in self.pool.get('res.users').browse(cr, uid, group_users, context=context)]
user_names = list(set(user_names))
if len(user_names) >= 5:
user_names = user_names[:5] + ['...']
raise osv.except_osv(_('Warning !'),