[FIX] fixed error if user assign wrong image path.
bzr revid: ysa@tinyerp.com-20101231093240-2m7eg0bpre7x3xsb
This commit is contained in:
@@ -257,8 +257,10 @@ class ir_ui_menu(osv.osv):
|
||||
def read_image(self, path):
|
||||
path_info = path.split(',')
|
||||
icon_path = addons.get_module_resource(path_info[0],path_info[1])
|
||||
icon = tools.file_open(icon_path,'rb').read()
|
||||
return base64.encodestring(icon)
|
||||
if icon_path:
|
||||
icon = tools.file_open(icon_path,'rb').read()
|
||||
icon_image = base64.encodestring(icon)
|
||||
return icon_image
|
||||
|
||||
def _get_image_icon(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
|
||||
Reference in New Issue
Block a user