[FIX] do not read depricated fields.

bzr revid: tpa@tinyerp.com-20121012073308-3eewtgihpnr6ri1z
This commit is contained in:
Turkesh Patel (Open ERP) 2012-10-12 13:03:08 +05:30
parent bb9e1825bc
commit 78d52f14aa
1 changed files with 4 additions and 0 deletions

View File

@ -3562,6 +3562,10 @@ class BaseModel(object):
self.check_access_rights(cr, user, 'read')
if not fields:
fields = list(set(self._columns.keys() + self._inherit_fields.keys()))
#remove depricated fields from field list
for field in fields:
if getattr(self._columns[field], 'deprecated'):
fields.remove(field)
if isinstance(ids, (int, long)):
select = [ids]
else: