From 9f3fd2a1fccae9e73f0c86c3c3461b2c1b421f9f Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 18 Jul 2011 19:31:51 +0200 Subject: [PATCH] [FIX] orm: avoid crash when an osv inherits from an osv_mem that has no _sql_constraints bzr revid: odo@openerp.com-20110718173151-hsq5pyzq8l5w1j7n --- openerp/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 69e238b3f7b..fd1eada26da 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -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():