[Erp5-report] r40199 nicolas.dumazet - /erp5/trunk/products/ERP5Type/Utils.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Nov 11 02:54:25 CET 2010
Author: nicolas.dumazet
Date: Thu Nov 11 02:54:24 2010
New Revision: 40199
URL: http://svn.erp5.org?rev=40199&view=rev
Log:
Make sure that Tools are registered correctly.
Since tool list is given explicitely to initializeProduct, we can rely
on this list directly for init. A wrong approach would be to try to
walk Tool/ for Tool classes, since not all Tools are located in this
subfolder.
Modified:
erp5/trunk/products/ERP5Type/Utils.py
Modified: erp5/trunk/products/ERP5Type/Utils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Utils.py?rev=40199&r1=40198&r2=40199&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Utils.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Utils.py [utf8] Thu Nov 11 02:54:24 2010
@@ -1099,6 +1099,9 @@ def initializeProduct( context,
# Tools initialization
tools = portal_tools
if len(tools) > 0:
+ for tool in tools:
+ n = tool.__name__
+ document_class_registry[n] = "%s.%s" % (tool.__module__, n)
try:
utils.ToolInit('%s Tool' % product_name,
tools=tools,
More information about the Erp5-report
mailing list