From 238dc43eee0b99d21a3ab8b67d692c0f46e6d999 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 22 Aug 2008 16:35:20 +0000
Subject: [PATCH] worklists for Leave Requests

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23127 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../worklists/1_draft_leave_request_list.xml  |   4 +-
 .../2_planned_leave_request_list.xml          |   7 +-
 .../3_ordered_leave_request_list.xml          | 112 ++++++++++++++++++
 bt5/erp5_calendar/bt/revision                 |   2 +-
 4 files changed, 119 insertions(+), 6 deletions(-)
 create mode 100644 bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/3_ordered_leave_request_list.xml

diff --git a/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/1_draft_leave_request_list.xml b/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/1_draft_leave_request_list.xml
index 0d0a54d40a..0ef1b453c7 100644
--- a/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/1_draft_leave_request_list.xml
+++ b/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/1_draft_leave_request_list.xml
@@ -21,13 +21,13 @@
         </item>
         <item>
             <key> <string>actbox_name</string> </key>
-            <value> <string>Draft Leave Requests (%(count)s)</string> </value>
+            <value> <string>Leave Requests to Submit(%(count)s)</string> </value>
         </item>
         <item>
             <key> <string>actbox_url</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
-leave_request_module?simulation_state=draft&local_roles=Owner&reset:int=1
+leave_request_module/view?simulation_state=draft&local_roles=Owner&reset:int=1
 
 ]]></string> </value>
         </item>
diff --git a/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/2_planned_leave_request_list.xml b/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/2_planned_leave_request_list.xml
index bc72850ec2..f9fc1841f7 100644
--- a/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/2_planned_leave_request_list.xml
+++ b/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/2_planned_leave_request_list.xml
@@ -21,13 +21,13 @@
         </item>
         <item>
             <key> <string>actbox_name</string> </key>
-            <value> <string>Planned Leave Requests (%(count)s)</string> </value>
+            <value> <string>Leave Requests to Approve (%(count)s)</string> </value>
         </item>
         <item>
             <key> <string>actbox_url</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
-leave_request_module?simulation_state=planned&local_roles=Assignee&reset:int=1
+leave_request_module/view?simulation_state=planned&local_roles:list=Associate&local_roles:list=Assignor&reset:int=1
 
 ]]></string> </value>
         </item>
@@ -67,7 +67,8 @@ leave_request_module?simulation_state=planned&local_roles=Assignee&reset:int=1
             <key> <string>roles</string> </key>
             <value>
               <tuple>
-                <string>Assignee</string>
+                <string>Associate</string>
+                <string>Assignor</string>
               </tuple>
             </value>
         </item>
diff --git a/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/3_ordered_leave_request_list.xml b/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/3_ordered_leave_request_list.xml
new file mode 100644
index 0000000000..9fc5e00ddc
--- /dev/null
+++ b/bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_workflow/worklists/3_ordered_leave_request_list.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="WorklistDefinition" module="Products.DCWorkflow.Worklists"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>actbox_category</string> </key>
+            <value> <string>global</string> </value>
+        </item>
+        <item>
+            <key> <string>actbox_name</string> </key>
+            <value> <string>Leave Requests to Validate (%(count)s)</string> </value>
+        </item>
+        <item>
+            <key> <string>actbox_url</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+leave_request_module/view?simulation_state=ordered&local_roles=Assignor&reset:int=1
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string>Ordered Leave Request</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>3_ordered_leave_request_list</string> </value>
+        </item>
+        <item>
+            <key> <string>var_matches</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+            </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>Assignor</string>
+              </tuple>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="3" aka="AAAAAAAAAAM=">
+    <pickle>
+      <tuple>
+        <global name="PersistentMapping" module="Persistence.mapping"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>data</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>portal_type</string> </key>
+                    <value>
+                      <tuple>
+                        <string>Leave Request</string>
+                      </tuple>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>simulation_state</string> </key>
+                    <value>
+                      <tuple>
+                        <string>ordered</string>
+                      </tuple>
+                    </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_calendar/bt/revision b/bt5/erp5_calendar/bt/revision
index b6e81543f7..8db9866c84 100644
--- a/bt5/erp5_calendar/bt/revision
+++ b/bt5/erp5_calendar/bt/revision
@@ -1 +1 @@
-330
\ No newline at end of file
+332
\ No newline at end of file
-- 
2.30.9