convert.py: use the get_object_reference() API for ir.model.data
Note that the "return False" would have never worked, since the _get_id() would have raised an exception for missing records. bzr revid: p_christ@hol.gr-20101126103344-ugr20dnti4gezdoe
This commit is contained in:
parent
12f4f6232c
commit
ca6fada256
|
@ -830,11 +830,7 @@ form: module.record_id""" % (xml_id,)
|
|||
mod = self.module
|
||||
if '.' in id_str:
|
||||
mod,id_str = id_str.split('.')
|
||||
result = model_data_obj._get_id(cr, self.uid, mod, id_str)
|
||||
res = model_data_obj.read(cr, self.uid, [result], ['model', 'res_id'])
|
||||
if res and res[0] and res[0]['res_id']:
|
||||
return res[0]['model'], int(res[0]['res_id'])
|
||||
return False
|
||||
return model_data_obj.get_object_reference(cr, self.uid, mod, id_str)
|
||||
|
||||
def parse(self, de):
|
||||
if not de.tag in ['terp', 'openerp']:
|
||||
|
|
Loading…
Reference in New Issue