[FIX] orm.import_data: look for exact match of name_search (courtesy of Martin Collins)

lp bug: https://launchpad.net/bugs/698354 fixed

bzr revid: odo@openerp.com-20110114105509-ozlgcpodsgvnp1m5
This commit is contained in:
Olivier Dony
2011-01-14 11:55:09 +01:00
parent 2af2dbefd5
commit 858fdc9a40
+1 -1
View File
@@ -726,7 +726,7 @@ class orm_template(object):
id = ir_model_data[0]['res_id']
else:
obj_model = self.pool.get(model_name)
ids = obj_model.name_search(cr, uid, id)
ids = obj_model.name_search(cr, uid, id, operator='=')
if not ids:
raise ValueError('No record found for %s' % (id,))
id = ids[0][0]