From 3c0bcdea5ce847b86c20815e23d4bd1b69ada50f Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Wed, 15 Nov 2006 14:42:28 +0000
Subject: [PATCH] Configure Order Rule and Delivery Rule.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11313 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_types/Delivery%20Rule/history.xml  | 89 +++++++++++++++++++
 .../portal_types/Delivery%20Rule/metadata.xml |  4 +-
 .../portal_types/Delivery%20Rule/print.xml    |  2 +-
 .../portal_types/Order%20Rule/history.xml     | 89 +++++++++++++++++++
 .../portal_types/Order%20Rule/metadata.xml    |  4 +-
 .../portal_types/Order%20Rule/print.xml       |  4 +-
 .../portal_rules/default_delivery_rule.xml    |  2 +-
 .../portal_rules/default_order_rule.xml       |  2 +-
 .../allowed_content_types.xml                 | 10 +++
 .../workflow_chain_type.xml                   |  8 ++
 bt5/erp5_trade/bt/revision                    |  2 +-
 bt5/erp5_trade/bt/template_action_path_list   |  2 +
 ...late_portal_type_allowed_content_type_list |  6 ++
 .../template_portal_type_workflow_chain_list  |  2 +
 14 files changed, 216 insertions(+), 10 deletions(-)
 create mode 100644 bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/history.xml
 create mode 100644 bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/history.xml

diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/history.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/history.xml
new file mode 100644
index 0000000000..7967a23223
--- /dev/null
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/history.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.ActionInformation</string>
+          <string>ActionInformation</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>object_view</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>history</string> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>View</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>5.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>History</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>string:${object_url}/Base_viewHistory</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/metadata.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/metadata.xml
index d4da2c8f83..d5d874fbc3 100644
--- a/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/metadata.xml
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/metadata.xml
@@ -54,7 +54,7 @@
         </item>
         <item>
             <key> <string>priority</string> </key>
-            <value> <float>4.0</float> </value>
+            <value> <float>6.0</float> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
@@ -81,7 +81,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>string:${object_url}/metadata_edit</string> </value>
+            <value> <string>string:${object_url}/Base_viewMetadata</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/print.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/print.xml
index 65501c0a45..8614a6991d 100644
--- a/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/print.xml
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Delivery%20Rule/print.xml
@@ -54,7 +54,7 @@
         </item>
         <item>
             <key> <string>priority</string> </key>
-            <value> <float>3.0</float> </value>
+            <value> <float>20.0</float> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/history.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/history.xml
new file mode 100644
index 0000000000..7967a23223
--- /dev/null
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/history.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.ActionInformation</string>
+          <string>ActionInformation</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>object_view</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>history</string> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>View</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>5.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>History</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>string:${object_url}/Base_viewHistory</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/metadata.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/metadata.xml
index d4da2c8f83..d5d874fbc3 100644
--- a/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/metadata.xml
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/metadata.xml
@@ -54,7 +54,7 @@
         </item>
         <item>
             <key> <string>priority</string> </key>
-            <value> <float>4.0</float> </value>
+            <value> <float>6.0</float> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
@@ -81,7 +81,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>string:${object_url}/metadata_edit</string> </value>
+            <value> <string>string:${object_url}/Base_viewMetadata</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/print.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/print.xml
index 8d09f5043e..f871a92fc4 100644
--- a/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/print.xml
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Order%20Rule/print.xml
@@ -54,7 +54,7 @@
         </item>
         <item>
             <key> <string>priority</string> </key>
-            <value> <float>3.0</float> </value>
+            <value> <float>10.0</float> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
@@ -81,7 +81,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>string:${object_url}/rule_print</string> </value>
+            <value> <string>string:${object_url}/Base_printPdf</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_trade/PathTemplateItem/portal_rules/default_delivery_rule.xml b/bt5/erp5_trade/PathTemplateItem/portal_rules/default_delivery_rule.xml
index 832523a566..3c71943a5b 100644
--- a/bt5/erp5_trade/PathTemplateItem/portal_rules/default_delivery_rule.xml
+++ b/bt5/erp5_trade/PathTemplateItem/portal_rules/default_delivery_rule.xml
@@ -52,7 +52,7 @@
         </item>
         <item>
             <key> <string>title</string> </key>
-            <value> <string></string> </value>
+            <value> <string>Default Delivery Rule</string> </value>
         </item>
         <item>
             <key> <string>uid</string> </key>
diff --git a/bt5/erp5_trade/PathTemplateItem/portal_rules/default_order_rule.xml b/bt5/erp5_trade/PathTemplateItem/portal_rules/default_order_rule.xml
index 5643b79989..c77b3c42af 100644
--- a/bt5/erp5_trade/PathTemplateItem/portal_rules/default_order_rule.xml
+++ b/bt5/erp5_trade/PathTemplateItem/portal_rules/default_order_rule.xml
@@ -52,7 +52,7 @@
         </item>
         <item>
             <key> <string>title</string> </key>
-            <value> <string></string> </value>
+            <value> <string>Default Order Rule</string> </value>
         </item>
         <item>
             <key> <string>uid</string> </key>
diff --git a/bt5/erp5_trade/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml b/bt5/erp5_trade/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
index e615891fc5..44afe79a73 100644
--- a/bt5/erp5_trade/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
+++ b/bt5/erp5_trade/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
@@ -6,6 +6,11 @@
  <portal_type id="Container Line">
   <item>Container Cell</item>
  </portal_type>
+ <portal_type id="Delivery Rule">
+  <item>Quantity Divergence Tester</item>
+  <item>Category Divergence Tester</item>
+  <item>Property Divergence Tester</item>
+ </portal_type>
  <portal_type id="Internal Packing List">
   <item>Internal Packing List Line</item>
  </portal_type>
@@ -24,6 +29,11 @@
  <portal_type id="Inventory Module">
   <item>Inventory</item>
  </portal_type>
+ <portal_type id="Order Rule">
+  <item>Property Divergence Tester</item>
+  <item>Category Divergence Tester</item>
+  <item>Quantity Divergence Tester</item>
+ </portal_type>
  <portal_type id="Purchase Order">
   <item>Payment Condition</item>
   <item>Purchase Order Line</item>
diff --git a/bt5/erp5_trade/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml b/bt5/erp5_trade/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
index d983f32b94..79cd362cf9 100644
--- a/bt5/erp5_trade/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+++ b/bt5/erp5_trade/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
@@ -15,6 +15,10 @@
   <type>Delivery Cell</type>
   <workflow>packing_list_interaction_workflow, delivery_edit_workflow</workflow>
  </chain>
+ <chain>
+  <type>Delivery Rule</type>
+  <workflow>edit_workflow</workflow>
+ </chain>
  <chain>
   <type>Discount</type>
   <workflow>edit_workflow</workflow>
@@ -39,6 +43,10 @@
   <type>Inventory Line</type>
   <workflow>trade_matrix_workflow, edit_workflow</workflow>
  </chain>
+ <chain>
+  <type>Order Rule</type>
+  <workflow>edit_workflow</workflow>
+ </chain>
  <chain>
   <type>Payment Condition</type>
   <workflow>edit_workflow</workflow>
diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision
index 1758dddcce..dc7b54ad01 100644
--- a/bt5/erp5_trade/bt/revision
+++ b/bt5/erp5_trade/bt/revision
@@ -1 +1 @@
-32
\ No newline at end of file
+33
\ No newline at end of file
diff --git a/bt5/erp5_trade/bt/template_action_path_list b/bt5/erp5_trade/bt/template_action_path_list
index 432132a97c..f3a89c23b6 100644
--- a/bt5/erp5_trade/bt/template_action_path_list
+++ b/bt5/erp5_trade/bt/template_action_path_list
@@ -14,6 +14,7 @@ Delivery Cell | history_view
 Delivery Cell | metadata
 Delivery Cell | print
 Delivery Cell | view
+Delivery Rule | history
 Delivery Rule | metadata
 Delivery Rule | print
 Delivery Rule | view
@@ -58,6 +59,7 @@ Inventory | history
 Inventory | metadata
 Inventory | print
 Inventory | view
+Order Rule | history
 Order Rule | metadata
 Order Rule | print
 Order Rule | view
diff --git a/bt5/erp5_trade/bt/template_portal_type_allowed_content_type_list b/bt5/erp5_trade/bt/template_portal_type_allowed_content_type_list
index 9528c13c28..a09e85d50d 100644
--- a/bt5/erp5_trade/bt/template_portal_type_allowed_content_type_list
+++ b/bt5/erp5_trade/bt/template_portal_type_allowed_content_type_list
@@ -1,12 +1,18 @@
 Container Line | Container Cell
 Container | Container
 Container | Container Line
+Delivery Rule | Category Divergence Tester
+Delivery Rule | Property Divergence Tester
+Delivery Rule | Quantity Divergence Tester
 Internal Packing List Line | Internal Packing List Cell
 Internal Packing List Module | Internal Packing List
 Internal Packing List | Internal Packing List Line
 Inventory Line | Inventory Cell
 Inventory Module | Inventory
 Inventory | Inventory Line
+Order Rule | Category Divergence Tester
+Order Rule | Property Divergence Tester
+Order Rule | Quantity Divergence Tester
 Purchase Order Line | Purchase Order Cell
 Purchase Order Module | Purchase Order
 Purchase Order | Discount
diff --git a/bt5/erp5_trade/bt/template_portal_type_workflow_chain_list b/bt5/erp5_trade/bt/template_portal_type_workflow_chain_list
index e2c6196de3..4da69e157f 100644
--- a/bt5/erp5_trade/bt/template_portal_type_workflow_chain_list
+++ b/bt5/erp5_trade/bt/template_portal_type_workflow_chain_list
@@ -6,6 +6,7 @@ Container Line | trade_matrix_workflow
 Container | edit_workflow
 Delivery Cell | delivery_edit_workflow
 Delivery Cell | packing_list_interaction_workflow
+Delivery Rule | edit_workflow
 Discount | edit_workflow
 Internal Packing List Cell | delivery_edit_workflow
 Internal Packing List Cell | packing_list_interaction_workflow
@@ -17,6 +18,7 @@ Inventory Line | edit_workflow
 Inventory Line | trade_matrix_workflow
 Inventory | edit_workflow
 Inventory | inventory_workflow
+Order Rule | edit_workflow
 Payment Condition | edit_workflow
 Purchase Order Cell | edit_workflow
 Purchase Order Line | edit_workflow
-- 
2.30.9