Commit 52bc4de1 authored by Nicolas Dumazet's avatar Nicolas Dumazet

load ERP5Type.PropertySheet later, when products are initialized


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41693 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6702317f
......@@ -1030,12 +1030,6 @@ class TestZodbImportFilesystemPropertySheet(ERP5TypeTestCase):
'acquisition_sync_value')
def afterSetUp(self):
# Get all the property sheets defined on the filesystem
self.filesystem_property_sheet_list = []
for name, klass in PropertySheet.__dict__.iteritems():
if name[0] != '_':
self.filesystem_property_sheet_list.append(klass)
# Mapping between the field name of a property and the default
# value as defined in StandardProperty and AcquiredProperty,
# meaningful because exporting a property relies on accessor which
......@@ -1189,8 +1183,13 @@ class TestZodbImportFilesystemPropertySheet(ERP5TypeTestCase):
"""
portal = self.getPortalObject().portal_property_sheets
for filesystem_property_sheet in self.filesystem_property_sheet_list:
property_sheet_name = filesystem_property_sheet.__name__
from Products.ERP5Type import PropertySheet
# Get all the property sheets defined on the filesystem
for name, klass in PropertySheet.__dict__.iteritems():
if name[0] == '_':
continue
filesystem_property_sheet = klass
property_sheet_name = name
# Rename the filesystem Property Sheet class to avoid clashing
# with existing Property Sheets in portal_property_sheets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment