[IMP] hr: image is not modified at display when choosing a new one; btu resized when...
[odoo/odoo.git] / addons / hr / hr.py
index 545d8a6..a153d63 100644 (file)
@@ -161,7 +161,7 @@ class hr_employee(osv.osv):
         return self.write(cr, uid, [id], {'image': tools.resize_image_big(value)}, context=context)
     
     def onchange_image(self, cr, uid, ids, value, context=None):
-        return {'value': tools.get_resized_images(value)}
+        return {'value': {'image_medium': tools.resize_image_big(value), 'image_small': tools.resize_image_big(value)}}
     
     _columns = {
         'country_id': fields.many2one('res.country', 'Nationality'),
@@ -264,7 +264,7 @@ class hr_employee(osv.osv):
         return {'value': {'work_email' : work_email}}
 
     def _get_default_image(self, cr, uid, context=None):
-        image_path = addons.get_module_resource('hr', 'images', 'photo.png')
+        image_path = addons.get_module_resource('hr', 'static/src/img', 'default_image.png')
         return tools.resize_image_big(open(image_path, 'rb').read().encode('base64'))
 
     _defaults = {