[FIX] Auto_init : correction for store functionality of an _inherits field
authorJay (OpenERP) <jvo@tinyerp.com>
Thu, 11 Nov 2010 10:28:42 +0000 (15:58 +0530)
committerJay (OpenERP) <jvo@tinyerp.com>
Thu, 11 Nov 2010 10:28:42 +0000 (15:58 +0530)
lp bug: https://launchpad.net/bugs/673447 fixed

bzr revid: jvo@tinyerp.com-20101111102842-llf920q8sog0z9fi

bin/osv/orm.py

index 4bb92a4..c0383d9 100644 (file)
@@ -2008,7 +2008,7 @@ class orm(orm_template):
         
         for record in store_fncts:
             if record[0] == self._name and (self._columns.get(record[1],False) or self._inherit_fields.get(record[1],False)):
-                if (not isinstance(self._columns[record[1]],fields.function)) or (record[1] in self._inherit_fields and not isinstance(self._inherit_fields[[record[1]]][2],fields.function)):
+                if (not isinstance(self._columns[record[1]],fields.function)) or (record[1] in self._inherit_fields and not isinstance(self._inherit_fields[record[1]][2],fields.function)):
                     remove_stores.append(record)
 
         for stores in remove_stores: