From 608f9942634335ea920aac493780c4e8fec6e365 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Wed, 19 Aug 2009 17:33:49 +0200 Subject: [PATCH] [FIX] avoid crash... lp bug: https://launchpad.net/bugs/415958 fixed bzr revid: christophe@tinyerp.com-20090819153349-ojvn980qfb1dk5b5 --- bin/osv/orm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 3a6dc8e42d0..4899ab48f4b 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -2533,12 +2533,12 @@ class orm(orm_template): for (t, c) in self._inherits.items(): if c in vals: avoid_table.append(t) - for f in self._columns.keys(): # + self._inherit_fields.keys(): + for f in self._columns.keys(): if (not f in vals) and (not isinstance(self._columns[f], fields.property)): default.append(f) for f in self._inherit_fields.keys(): - if (not f in vals) and (self._inherit_fields[f][0] not in avoid_table) and (not isinstance(self._columns[f], fields.property)): + if (not f in vals) and (self._inherit_fields[f][0] not in avoid_table) and (not isinstance(self._inherit_fields[f][2], fields.property)): default.append(f) if len(default):