[IMP] Avatar mini field gets automatically recomputed to avoid screwing the display when choosing a new one.

bzr revid: tde@openerp.com-20120313111418-fsrtwhcp0eesg0aq
This commit is contained in:
Thibault Delavallée 2012-03-13 12:14:18 +01:00
parent 8454553a5b
commit 4c41a2994a
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ class users(osv.osv):
return dict(zip(ids, ['extended' if user in extended_users else 'simple' for user in ids]))
def onchange_avatar_mini(self, cr, uid, ids, value, context=None):
return {'value': {'avatar': value } }
return {'value': {'avatar': value, 'avatar_mini': self._avatar_resize(cr, uid, value) } }
def _set_avatar_mini(self, cr, uid, id, name, value, args, context=None):
return self.write(cr, uid, [id], {'avatar': value}, context=context)