From 0644d29014cb5872f9485205191caa9fd7dca654 Mon Sep 17 00:00:00 2001
From: Wenjie Zheng <wenjie.zheng@tiolive.com>
Date: Wed, 18 Mar 2015 13:29:27 +0000
Subject: [PATCH] Workflow.py: correct state.getDestinationIdList, so the
 transition verification can be executed correctly.

---
 product/ERP5Workflow/Document/Workflow.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/product/ERP5Workflow/Document/Workflow.py b/product/ERP5Workflow/Document/Workflow.py
index 11c86a11a2..d4171edf92 100644
--- a/product/ERP5Workflow/Document/Workflow.py
+++ b/product/ERP5Workflow/Document/Workflow.py
@@ -190,7 +190,8 @@ class Workflow(XMLObject):
     sdef = document._getDefaultAcquiredValue(self.getStateBaseCategory())
     if sdef is None:
       return 0
-    if action in sdef.getDestinationValueList():
+
+    if action in sdef.getDestinationIdList():
       tdef = self._getOb(action, None)
       if (tdef is not None and
         tdef.trigger_type == TRIGGER_USER_ACTION and
@@ -247,9 +248,6 @@ class Workflow(XMLObject):
     return changed
   ### Security feature end
 
-
-
-
   def getRoleList(self):
     return sorted(self.getPortalObject().getDefaultModule('acl_users').valid_roles())
 
@@ -315,7 +313,7 @@ class Workflow(XMLObject):
 
       for tid in sdef.getDestinationIdList():
         tdef = self._getOb(id=tid)
-        LOG('zwj: Action is %s'%tid, WARNING, ' in Workflow.py.')
+        #LOG('zwj: Action is %s'%tid, WARNING, ' in Workflow.py.')
         if tdef is not None and tdef.trigger_type == TRIGGER_USER_ACTION and \
                 tdef.actbox_name and self._checkTransitionGuard(tdef, document):
             if fmt_data is None:
-- 
2.30.9