From 0af902f3da1e02a928d562866749be4315510bd9 Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Tue, 3 Jun 2008 20:02:17 +0000
Subject: [PATCH] Added Stock tabs in Packing Lists.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21304 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../Internal%20Packing%20List/view_stock.xml  | 83 +++++++++++++++++++
 .../Purchase%20Packing%20List/view_stock.xml  | 83 +++++++++++++++++++
 .../view_stock.xml                            | 83 +++++++++++++++++++
 .../packing_list_print.xml                    |  2 +-
 .../Sale%20Packing%20List/view_stock.xml      | 83 +++++++++++++++++++
 bt5/erp5_trade/bt/template_action_path_list   |  4 +
 6 files changed, 337 insertions(+), 1 deletion(-)
 create mode 100644 bt5/erp5_trade/ActionTemplateItem/portal_types/Internal%20Packing%20List/view_stock.xml
 create mode 100644 bt5/erp5_trade/ActionTemplateItem/portal_types/Purchase%20Packing%20List/view_stock.xml
 create mode 100644 bt5/erp5_trade/ActionTemplateItem/portal_types/Returned%20Sale%20Packing%20List/view_stock.xml
 create mode 100644 bt5/erp5_trade/ActionTemplateItem/portal_types/Sale%20Packing%20List/view_stock.xml

diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Internal%20Packing%20List/view_stock.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Internal%20Packing%20List/view_stock.xml
new file mode 100644
index 0000000000..3e5347bcaa
--- /dev/null
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Internal%20Packing%20List/view_stock.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
+        <tuple/>
+      </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>view_stock</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>Stock</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>
+        <global name="Expression" module="Products.CMFCore.Expression"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>string:${object_url}/Delivery_viewInventory</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Purchase%20Packing%20List/view_stock.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Purchase%20Packing%20List/view_stock.xml
new file mode 100644
index 0000000000..379ee57169
--- /dev/null
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Purchase%20Packing%20List/view_stock.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
+        <tuple/>
+      </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>view_stock</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>9.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Stock</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>
+        <global name="Expression" module="Products.CMFCore.Expression"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>string:${object_url}/Delivery_viewInventory</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Returned%20Sale%20Packing%20List/view_stock.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Returned%20Sale%20Packing%20List/view_stock.xml
new file mode 100644
index 0000000000..1d52cca5ee
--- /dev/null
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Returned%20Sale%20Packing%20List/view_stock.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
+        <tuple/>
+      </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>view_stock</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>10.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Stock</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>
+        <global name="Expression" module="Products.CMFCore.Expression"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>string:${object_url}/Delivery_viewInventory</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Sale%20Packing%20List/packing_list_print.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Sale%20Packing%20List/packing_list_print.xml
index 23e5928bc4..26913c52af 100644
--- a/bt5/erp5_trade/ActionTemplateItem/portal_types/Sale%20Packing%20List/packing_list_print.xml
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Sale%20Packing%20List/packing_list_print.xml
@@ -51,7 +51,7 @@
         </item>
         <item>
             <key> <string>priority</string> </key>
-            <value> <float>1.0</float> </value>
+            <value> <float>11.0</float> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_trade/ActionTemplateItem/portal_types/Sale%20Packing%20List/view_stock.xml b/bt5/erp5_trade/ActionTemplateItem/portal_types/Sale%20Packing%20List/view_stock.xml
new file mode 100644
index 0000000000..379ee57169
--- /dev/null
+++ b/bt5/erp5_trade/ActionTemplateItem/portal_types/Sale%20Packing%20List/view_stock.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
+        <tuple/>
+      </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>view_stock</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>9.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Stock</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>
+        <global name="Expression" module="Products.CMFCore.Expression"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>string:${object_url}/Delivery_viewInventory</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_trade/bt/template_action_path_list b/bt5/erp5_trade/bt/template_action_path_list
index 013b909a25..19609e6cdd 100644
--- a/bt5/erp5_trade/bt/template_action_path_list
+++ b/bt5/erp5_trade/bt/template_action_path_list
@@ -15,6 +15,7 @@ Internal Packing List Line | view_price
 Internal Packing List Module | view
 Internal Packing List Module | workflow_report
 Internal Packing List | view
+Internal Packing List | view_stock
 Inventory Cell | view
 Inventory Line | inventory_view
 Inventory Line | price_view
@@ -61,6 +62,7 @@ Purchase Packing List | jump_related_purchase_order
 Purchase Packing List | packing_list_print
 Purchase Packing List | profile_view
 Purchase Packing List | view
+Purchase Packing List | view_stock
 Purchase Trade Condition Module | view
 Purchase Trade Condition | view
 Purchase Trade Condition | view_discount
@@ -76,6 +78,7 @@ Returned Sale Packing List Module | workflow_report
 Returned Sale Packing List | choose_solve_actions
 Returned Sale Packing List | jump_related_sale_invoice
 Returned Sale Packing List | view
+Returned Sale Packing List | view_stock
 Sale Order Cell | view
 Sale Order Line | price_view
 Sale Order Line | quantity_view
@@ -107,6 +110,7 @@ Sale Packing List | jump_related_sale_invoice
 Sale Packing List | packing_list_print
 Sale Packing List | view
 Sale Packing List | view_container_list
+Sale Packing List | view_stock
 Sale Trade Condition Module | view
 Sale Trade Condition | view
 Sale Trade Condition | view_discount
-- 
2.30.9