[IMP] hr: changed default user image and moved it (better image, and placed in static/src/img, better name).

bzr revid: tde@openerp.com-20120730141017-vn8s0ny3y022hd1c
This commit is contained in:
Thibault Delavallée 2012-07-30 16:10:17 +02:00
parent 81f6d43ee4
commit a3820b4090
2 changed files with 7 additions and 2 deletions

View File

@ -38,7 +38,12 @@ You can manage:
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'images': ['images/hr_department.jpeg', 'images/hr_employee.jpeg','images/hr_job_position.jpeg'],
'images': [
'images/hr_department.jpeg',
'images/hr_employee.jpeg',
'images/hr_job_position.jpeg',
'static/src/img/default_image.png',
],
'depends': ['base_setup','mail', 'resource', 'board'],
'init_xml': [],
'update_xml': [

View File

@ -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 = {