r13507 - in ArchGenXML/trunk: . src/archgenxml

"Vincent Fretin" <[email protected]> Wed, 09 Mar 2011 10:25:36 +0000
Newsgroups gmane.comp.web.zope.plone.archetypes.cvs
Message-ID <[email protected]>
Author: vincentfretin
Date: Wed Mar  9 10:25:35 2011
New Revision: 13507

Modified:
   ArchGenXML/trunk/CHANGES.txt
   ArchGenXML/trunk/src/archgenxml/WorkflowGenerator.py
Log:
Use portal_type tagged-value if available instead of class name when
generating workflows.xml


Modified: ArchGenXML/trunk/CHANGES.txt
==============================================================================
--- ArchGenXML/trunk/CHANGES.txt	(original)
+++ ArchGenXML/trunk/CHANGES.txt	Wed Mar  9 10:25:35 2011
@@ -4,6 +4,10 @@
 2.6 (Unreleased)
 ----------------
 
+- Use portal_type tagged-value if available instead of class name when
+  generating workflows.xml.
+  [vincentfretin]
+
 - Added worklist:guard_expressions tag definition.
   [vincentfretin]
 

Modified: ArchGenXML/trunk/src/archgenxml/WorkflowGenerator.py
==============================================================================
--- ArchGenXML/trunk/src/archgenxml/WorkflowGenerator.py	(original)
+++ ArchGenXML/trunk/src/archgenxml/WorkflowGenerator.py	Wed Mar  9 10:25:35 2011
@@ -263,7 +263,8 @@
                 if not self.atgenerator._isContentClass(klass) and \
                    not klass.hasStereoType(self.atgenerator.stub_stereotypes):
                     continue
-                name = klass.getCleanName()
+                name = klass.getTaggedValue('portal_type') or \
+                       klass.getCleanName()
                 classes[name] = workflowId
 
         classNames = classes.keys()

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d