[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:
parent
aa749dd921
commit
9f3fd2a1fc
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue