From 02f4b0ac0395337ce4ac05c1f8b4464f6fcf0cd5 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Wed, 22 Dec 2004 17:03:21 +0000
Subject: [PATCH] again small fix for convertToMixedCased on wf methods in
 aq_dynamic

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2102 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/Base.py      | 6 +++---
 product/ERP5Type/ZopePatch.py | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py
index 2598bfab56..7a7c5d6402 100755
--- a/product/ERP5Type/Base.py
+++ b/product/ERP5Type/Base.py
@@ -191,10 +191,10 @@ def initializePortalTypeDynamicProperties(self, klass, ptype, recursive=0):
               if tdef.trigger_type == TRIGGER_WORKFLOW_METHOD:
                 method_id = convertToMixedCase(tr_id)
                 if not hasattr(klass, method_id):
-                  method = WorkflowMethod(klass._doNothing, method_id)
+                  method = WorkflowMethod(klass._doNothing, tr_id)
                   setattr(prop_holder, method_id, method) # Attach to portal_type
                   prop_holder.security.declareProtected( Permissions.AccessContentsInformation, method_id )
-                  LOG('in aq_portal_type %s' % id, 0, "added transition method %s" % method_id)
+                  #LOG('in aq_portal_type %s' % id, 0, "added transition method %s" % method_id)
                 else:
                   # Wrap method into WorkflowMethod is needed
                   method = getattr(klass, method_id)
@@ -208,7 +208,7 @@ def initializePortalTypeDynamicProperties(self, klass, ptype, recursive=0):
                 for imethod_id in tdef.method_id:
                   method_id = convertToMixedCase(imethod_id)
                   if not hasattr(klass, method_id):
-                    method = WorkflowMethod(klass._doNothing, method_id)
+                    method = WorkflowMethod(klass._doNothing, imethod_id)
                     setattr(prop_holder, method_id, method) # Attach to portal_type
                     prop_holder.security.declareProtected( Permissions.AccessContentsInformation, method_id )
                     #LOG('in aq_portal_type %s' % id, 0, "added interaction method %s" % method_id)
diff --git a/product/ERP5Type/ZopePatch.py b/product/ERP5Type/ZopePatch.py
index 7920c7ed93..91a87c9951 100755
--- a/product/ERP5Type/ZopePatch.py
+++ b/product/ERP5Type/ZopePatch.py
@@ -505,6 +505,7 @@ from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition, StateChangeInfo
 from Products.DCWorkflow import DCWorkflow
 from Products.DCWorkflow.Transitions import TRIGGER_WORKFLOW_METHOD
 from Products.CMFCore.WorkflowCore import WorkflowException
+from Products.ERP5Type.Utils import convertToMixedCase
 
 class ValidationFailed(Exception):
     """Transition can not be executed because data is not in consistent state"""
-- 
2.30.9