[CMF-checkins] CVS: CMF/CMFCore - TypesTool.py:1.34
Florent Guillaume
fg@nuxeo.com
Sat, 29 Jun 2002 19:23:45 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv5397
Modified Files:
TypesTool.py
Log Message:
Scriptable types were not being inserted into the workflows by calling
wf.notifyCreated().
=== CMF/CMFCore/TypesTool.py 1.33 => 1.34 ===
if hasattr(ob, '_setPortalTypeName'):
ob._setPortalTypeName(self.getId())
+
wf = getToolByName(ob, 'portal_workflow', None)
if wf is not None:
wf.notifyCreated(ob)
+
return ob
InitializeClass( FactoryTypeInformation )
@@ -497,9 +499,14 @@
id = str(id)
ob = apply(constructor, (container, id) + args, kw)
+
if hasattr(ob, '_setPortalTypeName'):
ob._setPortalTypeName(self.getId())
+ wf = getToolByName(ob, 'portal_workflow', None)
+ if wf is not None:
+ wf.notifyCreated(ob)
+
return ob
InitializeClass( ScriptableTypeInformation )
@@ -755,6 +762,7 @@
ob = apply(info.constructInstance, (container, id) + args, kw)
+ # reindex after _setPortalTypeName has been called.
ob.reindexObject()
if RESPONSE is not None: