Use object_name_list for the new pool.get behavior

This commit is contained in:
Cédric Krier committed 2008-07-22 18:22:30 +02:00
1 parent 9f6467205e
commit d245880a31
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -102,9 +102,9 @@ class BrowseRecord(object):
# create browse records for 'remote' objects
for data in datas:
for i, j in ffields:
obj = self._table.pool.get(j._obj)
if not obj:
if not j._obj in self._table.pool.object_name_list():
continue
obj = self._table.pool.get(j._obj)
if j._type in ('many2one',):
if not j._classic_write and data[i]:
if isinstance(data[i][0], (list, tuple)):
+1 -1
View File
@@ -155,7 +155,7 @@ class OSV(ORM):
try to apply inheritancy at the instanciation level and
put objs in the pool var
"""
if pool.get(cls._name):
if cls._name in pool.object_name_list():
parent_class = pool.get(cls._name).__class__
cls = type(cls._name, (cls, parent_class), {})