[Erp5-report] r41440 nicolas.dumazet - /erp5/trunk/products/ERP5Type/Tool/ClassTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Dec 15 08:20:12 CET 2010
Author: nicolas.dumazet
Date: Wed Dec 15 08:20:12 2010
New Revision: 41440
URL: http://svn.erp5.org?rev=41440&view=rev
Log:
ERP5Type.Document does not contain anything meaningful anymore
This fixes testClassTool.test_AsDocumentationHelperOnClassTool
Modified:
erp5/trunk/products/ERP5Type/Tool/ClassTool.py
Modified: erp5/trunk/products/ERP5Type/Tool/ClassTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Tool/ClassTool.py?rev=41440&r1=41439&r2=41440&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Tool/ClassTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Tool/ClassTool.py [utf8] Wed Dec 15 08:20:12 2010
@@ -53,7 +53,6 @@ from Products.ERP5Type import _dtmldir
from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type.Core.Folder import Folder
from Products.ERP5Type.Core.Folder import OFS_HANDLER
-from Products.ERP5Type import Document
from Products.ERP5Type.Utils import readLocalPropertySheet, writeLocalPropertySheet, getLocalPropertySheetList
from Products.ERP5Type.Utils import readLocalExtension, writeLocalExtension, getLocalExtensionList
@@ -1104,7 +1103,11 @@ def initialize( context ):
XXX: this code is (almost) duplicated from ERP5Types/Base.py:asDocumentationHelper
"""
- my_class = getattr(getattr(Document, class_id), class_id)
+ from Products.ERP5Type import document_class_registry
+ from Products.ERP5Type.dynamic.portal_type_class import _importClass
+ # XXX so this is ugly, but should disappear with classes in ZODB
+ my_class = _importClass(document_class_registry[class_id])
+
method_list = []
property_list = []
dochelper = newTempDocumentationHelper(self.getPortalObject(), class_id, title=class_id,
More information about the Erp5-report
mailing list