diff options
| author | Olivier Dony <odo@openerp.com> | 2011-01-06 18:38:28 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2011-01-06 18:38:28 +0100 |
| commit | 7d3375f49f6d4ef47b148dc3f229f3012a358643 (patch) | |
| tree | fadd5ac0486560e6f7ce70c23d93fc5a76a3e585 /bin/addons/base/ir/ir_ui_menu.py | |
| parent | f68dbc723c2a74aed5bb2c4add9ccb76bb82d1bf (diff) | |
| parent | bf5765b3ef0f22dcbca413e86fc39dfef9f1d87f (diff) | |
[MERGE] bugfixes: default language for partners, password change, validation of custom selection fields, ...
See the bug links
lp bug: https://launchpad.net/bugs/670264 fixed
lp bug: https://launchpad.net/bugs/692891 fixed
lp bug: https://launchpad.net/bugs/695678 fixed
lp bug: https://launchpad.net/bugs/631547 fixed
lp bug: https://launchpad.net/bugs/632927 fixed
bzr revid: odo@openerp.com-20110106173828-kdv1gtdvbws1ceb5
Diffstat (limited to 'bin/addons/base/ir/ir_ui_menu.py')
| -rw-r--r-- | bin/addons/base/ir/ir_ui_menu.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/bin/addons/base/ir/ir_ui_menu.py b/bin/addons/base/ir/ir_ui_menu.py index 08725fbb9cb..ef9f7f28308 100644 --- a/bin/addons/base/ir/ir_ui_menu.py +++ b/bin/addons/base/ir/ir_ui_menu.py @@ -257,12 +257,14 @@ 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_file = tools.file_open(icon_path,'rb') - try: - icon = icon_file.read() - return base64.encodestring(icon) - finally: - icon_file.close() + icon_image = False + if icon_path: + try: + icon_file = tools.file_open(icon_path,'rb') + icon_image = base64.encodestring(icon_file.read()) + finally: + icon_file.close() + return icon_image def _get_image_icon(self, cr, uid, ids, name, args, context=None): res = {} @@ -304,7 +306,7 @@ class ir_ui_menu(osv.osv): ('ir.actions.server', 'ir.actions.server'), ]), } - + def _rec_message(self, cr, uid, ids, context=None): return _('Error ! You can not create recursive Menu.') |
