[FIX] hr.py : refactor getPhoto

bzr revid: tfr@openerp.com-20101028094532-to4vauqo1svcypbd
This commit is contained in:
Thibault Francois 2010-10-28 11:45:32 +02:00
parent 9cc07c4ee7
commit fb379188b8
1 changed files with 2 additions and 2 deletions

View File

@ -183,8 +183,8 @@ class hr_employee(osv.osv):
return {'value': {'work_email' : work_email}}
def _get_photo(self, cr, uid, context=None):
return open(addons.get_module_resource('hr','image','photo.png'),
'rb').read().encode('base64')
photo_path = addons.get_module_resource('hr','image','photo.png')
return open(photo_path, 'rb').read().encode('base64')
_defaults = {
'active': 1,