From 86b58baadb1ac8858bf8e00e38c463e61c160b7e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 30 Jan 2006 20:27:19 +0000
Subject: [PATCH] added actions for validation of many transactions in list
 most

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5452 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../close_transactions.xml                    | 118 ++++++++++++++++++
 .../confirm_transactions.xml                  |  97 ++++++++++++++
 .../plan_transactions.xml                     |  97 ++++++++++++++
 .../validate_transactions.xml                 | 118 ++++++++++++++++++
 .../bt/template_action_path_list              |   4 +
 5 files changed, 434 insertions(+)
 create mode 100755 bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/close_transactions.xml
 create mode 100755 bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/confirm_transactions.xml
 create mode 100755 bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/plan_transactions.xml
 create mode 100755 bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/validate_transactions.xml

diff --git a/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/close_transactions.xml b/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/close_transactions.xml
new file mode 100755
index 0000000000..cd7079d0e4
--- /dev/null
+++ b/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/close_transactions.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.ERP5Type.patches.ActionInformation</string>
+          <string>PatchedActionInformation</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>action</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>category</string> </key>
+            <value> <string>workflow</string> </value>
+        </item>
+        <item>
+            <key> <string>condition</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>close_transactions</string> </value>
+        </item>
+        <item>
+            <key> <string>optional</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>View</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>22.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Close Transactions</string> </value>
+        </item>
+        <item>
+            <key> <string>visible</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.Expression</string>
+          <string>Expression</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+string:${object_url}/Folder_viewWorkflowActionDialog?workflow_action=deliver_action&workflow_id=accounting_workflow&button_title=Close Transactions
+
+]]></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="3" aka="AAAAAAAAAAM=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.Expression</string>
+          <string>Expression</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>python:"Assignor" in object.portal_membership.getAuthenticatedMember().getRolesInContext(object)</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/confirm_transactions.xml b/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/confirm_transactions.xml
new file mode 100755
index 0000000000..bebe1c0bc0
--- /dev/null
+++ b/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/confirm_transactions.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.ERP5Type.patches.ActionInformation</string>
+          <string>PatchedActionInformation</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>action</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>category</string> </key>
+            <value> <string>workflow</string> </value>
+        </item>
+        <item>
+            <key> <string>condition</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>confirm_transactions</string> </value>
+        </item>
+        <item>
+            <key> <string>optional</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>View</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>20.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Confirm Transactions</string> </value>
+        </item>
+        <item>
+            <key> <string>visible</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.Expression</string>
+          <string>Expression</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+string:${object_url}/Folder_viewWorkflowActionDialog?workflow_action=confirm_action&workflow_id=accounting_workflow&button_title=Confirm Transactions
+
+]]></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/plan_transactions.xml b/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/plan_transactions.xml
new file mode 100755
index 0000000000..c38d6fbe00
--- /dev/null
+++ b/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/plan_transactions.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.ERP5Type.patches.ActionInformation</string>
+          <string>PatchedActionInformation</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>action</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>category</string> </key>
+            <value> <string>workflow</string> </value>
+        </item>
+        <item>
+            <key> <string>condition</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>plan_transactions</string> </value>
+        </item>
+        <item>
+            <key> <string>optional</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>View</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>19.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Plan Transactions</string> </value>
+        </item>
+        <item>
+            <key> <string>visible</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.Expression</string>
+          <string>Expression</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+string:${object_url}/Folder_viewWorkflowActionDialog?workflow_action=plan_action&workflow_id=accounting_workflow&button_title=Plan Transactions
+
+]]></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/validate_transactions.xml b/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/validate_transactions.xml
new file mode 100755
index 0000000000..a122e37be8
--- /dev/null
+++ b/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/validate_transactions.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.ERP5Type.patches.ActionInformation</string>
+          <string>PatchedActionInformation</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>action</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>category</string> </key>
+            <value> <string>workflow</string> </value>
+        </item>
+        <item>
+            <key> <string>condition</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>validate_transactions</string> </value>
+        </item>
+        <item>
+            <key> <string>optional</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>View</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>21.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Validate Transactions</string> </value>
+        </item>
+        <item>
+            <key> <string>visible</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.Expression</string>
+          <string>Expression</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+string:${object_url}/Folder_viewWorkflowActionDialog?workflow_action=stop_action&workflow_id=accounting_workflow&button_title=Validate Transactions
+
+]]></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="3" aka="AAAAAAAAAAM=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.Expression</string>
+          <string>Expression</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>python:"Assignee" in object.portal_membership.getAuthenticatedMember().getRolesInContext(object)</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/bt/template_action_path_list b/bt5/erp5_accounting/bt/template_action_path_list
index d8aa52097b..8e83d96824 100755
--- a/bt5/erp5_accounting/bt/template_action_path_list
+++ b/bt5/erp5_accounting/bt/template_action_path_list
@@ -31,6 +31,8 @@ Accounting Transaction Line | view
 Accounting Transaction Module | account_statement_report
 Accounting Transaction Module | bank_accounts_report
 Accounting Transaction Module | close_accounting_period
+Accounting Transaction Module | close_transactions
+Accounting Transaction Module | confirm_transactions
 Accounting Transaction Module | csv_export
 Accounting Transaction Module | fiscal_report
 Accounting Transaction Module | general_ledger_report
@@ -38,6 +40,7 @@ Accounting Transaction Module | journal_report
 Accounting Transaction Module | jump_active_accounting_pref
 Accounting Transaction Module | jump_bank_accounts
 Accounting Transaction Module | list_ui
+Accounting Transaction Module | plan_transactions
 Accounting Transaction Module | print
 Accounting Transaction Module | report
 Accounting Transaction Module | search
@@ -45,6 +48,7 @@ Accounting Transaction Module | social_report
 Accounting Transaction Module | sort_on
 Accounting Transaction Module | third_parties_report
 Accounting Transaction Module | trial_balance_report
+Accounting Transaction Module | validate_transactions
 Accounting Transaction Module | view
 Accounting Transaction | create_reversal
 Accounting Transaction | destination_asset
-- 
2.30.9