diff options
| author | gpa <gpa@tinyerp.com> | 2010-11-25 10:57:29 +0530 |
|---|---|---|
| committer | gpa <gpa@tinyerp.com> | 2010-11-25 10:57:29 +0530 |
| commit | 9de5e301e1cd721d2aa7521b648b297969bfcef0 (patch) | |
| tree | 309fc8f008343ca35c2e2888145a3dc814a0203f /bin/addons | |
| parent | 1a6ab82f7bd3c03020ea077029a8a174d7342727 (diff) | |
Improvement for the transformation of the icon file paths inside
bzr revid: gpa@tinyerp.com-20101125052729-bajcewtj468rhcjx
Diffstat (limited to 'bin/addons')
| -rw-r--r-- | bin/addons/base/ir/ir_ui_menu.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/addons/base/ir/ir_ui_menu.py b/bin/addons/base/ir/ir_ui_menu.py index cdde195e14f..b9a26fd2cb8 100644 --- a/bin/addons/base/ir/ir_ui_menu.py +++ b/bin/addons/base/ir/ir_ui_menu.py @@ -23,6 +23,7 @@ from osv import fields, osv import re import tools import base64 +import addons def one_in(setA, setB): """Check the presence of an element of setA in setB @@ -263,7 +264,9 @@ class ir_ui_menu(osv.osv): return True def read_image(self, path): - icon = tools.file_open(path,'rb').read() + file = path.split(',') + icon_path = addons.get_module_resource(file[0],file[1]) + icon = tools.file_open(icon_path,'rb').read() return base64.encodestring(icon) def _get_image_icon(self, cr, uid, ids, name, args, context=None): |
