diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 6aafd05e0bf..cfd811a80dc 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -1106,7 +1106,7 @@ class BaseModel(object): def _get_xml_id(self, cr, uid, r): model_data = self.pool.get('ir.model.data') - data_ids = model_data.search(cr, uid, [('model', '=', r._model._table), ('res_id', '=', r['id'])]) + data_ids = model_data.search(cr, uid, [('model', '=', r._model._name), ('res_id', '=', r['id'])]) if len(data_ids): d = model_data.read(cr, uid, data_ids, ['name', 'module'])[0] if d['module']: