[Erp5-report] r41637 nicolas.dumazet - /erp5/trunk/products/ERP5Type/dynamic/
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Dec 22 06:51:55 CET 2010
Author: nicolas.dumazet
Date: Wed Dec 22 06:51:54 2010
New Revision: 41637
URL: http://svn.erp5.org?rev=41637&view=rev
Log:
* if a property sheet is a string, only try to load it from ZODB
if it is present overthere (otherwise, it is likely a property sheet
in ERP5PropertySheetLegacy and it will be loaded by aq_dynamic)
* comment as to why Solver Tool is one of the exceptions
* LOG when Property Sheet Tool is missing
Modified:
erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py
Modified: erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py?rev=41637&r1=41636&r2=41637&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py [utf8] Wed Dec 22 06:51:54 2010
@@ -39,7 +39,7 @@ from Products.ERP5Type.Utils import setD
from Products.ERP5Type import document_class_registry, mixin_class_registry
from zope.interface import classImplements
-from zLOG import LOG, ERROR, INFO
+from zLOG import LOG, ERROR, INFO, WARNING
def _importClass(classpath):
try:
@@ -117,6 +117,9 @@ property_sheet_generating_portal_type_se
# import of 'Types Tool' class without any mixin, interface or
# Property Sheet to allow the outer (which will actually be stored in
# 'erp5.portal_type') to be fully generated.
+#
+# Solver Tool, as a TypeProvider, will also be required to access
+# site.portal_types
core_portal_type_class_dict = {
'Base Type': {'type_class': 'ERP5TypeInformation',
'generating': False},
@@ -228,7 +231,10 @@ def generatePortalTypeClass(portal_type_
# The Property Sheet Tool may be None if the code is updated but
# the BT has not been upgraded yet with portal_property_sheets
- if property_sheet_tool is not None:
+ if property_sheet_tool is None:
+ LOG("ERP5Type.dynamic", WARNING,
+ "Property Sheet Tool was not found. Please update erp5_core "
+ "Business Template")
if portal_type is not None:
# Get the Property Sheets defined on the portal_type and use the
# ZODB Property Sheet rather than the filesystem only if it
@@ -237,6 +243,8 @@ def generatePortalTypeClass(portal_type_
for property_sheet in portal_type.getTypePropertySheetList():
if property_sheet in zodb_property_sheet_set:
property_sheet_set.add(property_sheet)
+ else:
+ zodb_property_sheet_set = set()
# Get the Property Sheets defined on the document and its bases
# recursively. Fallback on the filesystem Property Sheet only and
@@ -248,7 +256,8 @@ def generatePortalTypeClass(portal_type_
#
# NOTE: The Property Sheets of a document should be given as a
# string from now on
- if isinstance(property_sheet, basestring):
+ if isinstance(property_sheet, basestring) and \
+ property_sheet in zodb_property_sheet_set:
property_sheet_name = property_sheet
property_sheet_set.add(property_sheet_name)
More information about the Erp5-report
mailing list