diff options
| author | P. Christeas <p_christ@hol.gr> | 2010-11-26 12:33:44 +0200 |
|---|---|---|
| committer | P. Christeas <p_christ@hol.gr> | 2010-11-26 12:33:44 +0200 |
| commit | ca6fada2564ce40efd2d660755bf7c2f1c7cf006 (patch) | |
| tree | 2c345144b48c2f85cffb307ba7065aa614858ffe /bin/tools | |
| parent | 12f4f6232cf2b9bf2475844cdcdb12599bab952c (diff) | |
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
Diffstat (limited to 'bin/tools')
| -rw-r--r-- | bin/tools/convert.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/bin/tools/convert.py b/bin/tools/convert.py index 1d050a832a4..3190335f4c2 100644 --- a/bin/tools/convert.py +++ b/bin/tools/convert.py @@ -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']: |
