c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #03856
[Bug 655792] Re: bug in hr/hr.py
This has been fixed due to the fix of bug 507973.
--
bug in hr/hr.py
https://bugs.launchpad.net/bugs/655792
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
Status in OpenObject Addons Modules: Fix Released
Bug description:
If there is more than one addons path defined (in config file), then the routine get_photo crashes because it assumes there is only one addon path defined.
Here is the fix:
def _get_photo(self, cr, uid, context=None):
if tools.config['addons_path'].find(',') != -1:
addons_path = tools.config['addons_path'].split(',')
for path in addons_path:
if os.path.isfile(os.path.join(path, 'hr/image', 'photo.png')):
return open(os.path.join(path, 'hr/image', 'photo.png'),'rb').read().encode('base64')
else:
return open(os.path.join( tools.config['addons_path'], 'hr/image', 'photo.png'),'rb').read().encode('base64')