From 2e60ac5461a18109a1775f1476ef91e709d7266f Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Mon, 18 Apr 2011 16:34:22 +0000
Subject: [PATCH] Do not allow cancelling from delivered state.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45549 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../states/delivered.xml                      |  5 +-
 .../transitions/deliver_to_cancel_action.xml  | 78 -------------------
 bt5/erp5_banking_core/bt/revision             |  2 +-
 3 files changed, 2 insertions(+), 83 deletions(-)
 delete mode 100644 bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_cancellation_workflow/transitions/deliver_to_cancel_action.xml

diff --git a/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_cancellation_workflow/states/delivered.xml b/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_cancellation_workflow/states/delivered.xml
index 787d057e4f..cc0825b749 100644
--- a/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_cancellation_workflow/states/delivered.xml
+++ b/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_cancellation_workflow/states/delivered.xml
@@ -27,10 +27,7 @@
         <item>
             <key> <string>transitions</string> </key>
             <value>
-              <tuple>
-                <string>cancel</string>
-                <string>deliver_to_cancel_action</string>
-              </tuple>
+              <tuple/>
             </value>
         </item>
         <item>
diff --git a/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_cancellation_workflow/transitions/deliver_to_cancel_action.xml b/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_cancellation_workflow/transitions/deliver_to_cancel_action.xml
deleted file mode 100644
index e9f1bfeb61..0000000000
--- a/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_cancellation_workflow/transitions/deliver_to_cancel_action.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>actbox_category</string> </key>
-            <value> <string>workflow</string> </value>
-        </item>
-        <item>
-            <key> <string>actbox_name</string> </key>
-            <value> <string>Cancel</string> </value>
-        </item>
-        <item>
-            <key> <string>actbox_url</string> </key>
-            <value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?field_my_workflow_action=cancel_action</string> </value>
-        </item>
-        <item>
-            <key> <string>after_script_name</string> </key>
-            <value> <string>cancel</string> </value>
-        </item>
-        <item>
-            <key> <string>description</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>guard</string> </key>
-            <value>
-              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>deliver_to_cancel_action</string> </value>
-        </item>
-        <item>
-            <key> <string>new_state_id</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>script_name</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string>Deliver To Cancel Action</string> </value>
-        </item>
-        <item>
-            <key> <string>trigger_type</string> </key>
-            <value> <int>1</int> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="2" aka="AAAAAAAAAAI=">
-    <pickle>
-      <tuple>
-        <global name="Guard" module="Products.DCWorkflow.Guard"/>
-        <tuple/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>roles</string> </key>
-            <value>
-              <tuple>
-                <string>Manager</string>
-              </tuple>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision
index 83be903e06..8f7277e735 100644
--- a/bt5/erp5_banking_core/bt/revision
+++ b/bt5/erp5_banking_core/bt/revision
@@ -1 +1 @@
-570
\ No newline at end of file
+571
\ No newline at end of file
-- 
2.30.9