Fix rec_name to check also in inherited fields for issue944

This commit is contained in:
Cédric Krier committed 2009-04-07 19:05:41 +02:00
1 parent a352575ef0
commit 55f67eb90f
1 file changed
+2 -1
+2 -1
View File
@@ -406,7 +406,8 @@ class ModelStorage(Model):
return {}
res = {}
rec_name = self._rec_name
if rec_name not in self._columns:
if rec_name not in self._columns \
and rec_name not in self._inherit_fields.keys():
rec_name = 'id'
for record in self.browse(cursor, user, ids, context=context):
res[record.id] = unicode(record[rec_name])