Don't read all inherit fields if no one is asked

bzr revid: ced-b25e0b174877a12db8c7510f199b490faea4e8dc
This commit is contained in:
ced 2007-08-14 14:13:00 +00:00
parent cca1e01187
commit 9afa410c7e
1 changed files with 2 additions and 0 deletions

View File

@ -809,6 +809,8 @@ class orm(object):
for table in self._inherits:
col = self._inherits[table]
cols = intersect(self._inherit_fields.keys(), fields)
if not cols:
continue
res2 = self.pool.get(table).read(cr, user, [x[col] for x in res], cols, context, load)
res3 = {}