Commit e1fa1868 authored by Nicolas Dumazet's avatar Nicolas Dumazet

allow having strings in Document classes's property_sheets attributes, and make

sure that aq_dynamic will know where to find the property sheet


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41638 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4aa1234c
......@@ -580,6 +580,12 @@ def initializePortalTypeDynamicProperties(self, klass, ptype, aq_key, portal):
# be necessary as soon as all the Documents and Property Sheets
# have been migrated. This is kept for backward compatility with
# the filesystem Property Sheet (see ERP5Type.dynamic.portal_type_class)
if isinstance(base, basestring):
# The property Sheet might be in ERP5PropertySheetLegacy,
# give it a try. If it's not there, no need to warn or log
# heavily: it just means that it will be a ZODB propertysheet
from Products.ERP5Type import PropertySheet
base = getattr(PropertySheet, base)
if isinstance(base, basestring):
continue
......
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