[FIX] orm: avoid crash when an osv inherits from an osv_mem that has no _sql_constraints

bzr revid: odo@openerp.com-20110718173151-hsq5pyzq8l5w1j7n
This commit is contained in:
Olivier Dony 2011-07-18 19:31:51 +02:00
parent aa749dd921
commit 9f3fd2a1fc
1 changed files with 1 additions and 1 deletions

View File

@ -781,7 +781,7 @@ class orm_template(object):
'You may need to add a dependency on the parent class\' module.' % (name, parent_name))
nattr = {}
for s in attributes:
new = copy.copy(getattr(pool.get(parent_name), s))
new = copy.copy(getattr(pool.get(parent_name), s, {}))
if s == '_columns':
# Don't _inherit custom fields.
for c in new.keys():