diff --git a/bin/addons/base/ir/ir_values.py b/bin/addons/base/ir/ir_values.py index 64b36a26a41..9168f5b1f88 100644 --- a/bin/addons/base/ir/ir_values.py +++ b/bin/addons/base/ir/ir_values.py @@ -149,7 +149,11 @@ class ir_values(osv.osv): def _result_get(x): if x[3]: model,id = x[2].split(',') - datas = self.pool.get(model).read(cr, uid, [int(id)], False, context) + try: + id = int(id) + except: + return False + datas = self.pool.get(model).read(cr, uid, [id], False, context) if not len(datas): #ir_del(cr, uid, x[0]) return False diff --git a/bin/tools/convert.py b/bin/tools/convert.py index a8e1481a75c..5a80de3157d 100644 --- a/bin/tools/convert.py +++ b/bin/tools/convert.py @@ -268,7 +268,7 @@ class xml_import(object): id = self.pool.get('ir.model.data')._update(cr, self.uid, "ir.actions.wizard", self.module, res, xml_id, mode=self.mode) self.idref[xml_id] = id # ir_set - if not rec.hasAttribute('menu') or eval(rec.getAttribute('menu')): + if (not rec.hasAttribute('menu') or eval(rec.getAttribute('menu'))) and id: keyword = str(rec.getAttribute('keyword') or 'client_action_multi') keys = [('action',keyword),('res_model',model)] value = 'ir.actions.wizard,'+str(id)