From bbd60db20928588679a343f1f97def4a6478be19 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Tue, 21 Jun 2011 15:43:02 +0200
Subject: [PATCH] add Internal Packing List Builder in deliver link, and remove
 harmful override of SaleOrder_selectMovement.

---
 .../erp5_default_business_process/deliver.xml |  5 +-
 .../SaleOrder_selectMovement.xml              | 92 -------------------
 bt5/erp5_simulation_test/bt/revision          |  2 +-
 3 files changed, 4 insertions(+), 95 deletions(-)
 delete mode 100644 bt5/erp5_simulation_test/SkinTemplateItem/portal_skins/erp5_simulation_test/SaleOrder_selectMovement.xml

diff --git a/bt5/erp5_simulation_test/PathTemplateItem/business_process_module/erp5_default_business_process/deliver.xml b/bt5/erp5_simulation_test/PathTemplateItem/business_process_module/erp5_default_business_process/deliver.xml
index cbcfaec9c7..fe3ccd296d 100644
--- a/bt5/erp5_simulation_test/PathTemplateItem/business_process_module/erp5_default_business_process/deliver.xml
+++ b/bt5/erp5_simulation_test/PathTemplateItem/business_process_module/erp5_default_business_process/deliver.xml
@@ -76,11 +76,12 @@
             <key> <string>categories</string> </key>
             <value>
               <tuple>
-                <string>delivery_builder/portal_deliveries/purchase_packing_list_builder</string>
-                <string>delivery_builder/portal_deliveries/sale_packing_list_builder</string>
                 <string>trade_phase/default/delivery</string>
                 <string>predecessor/trade_state/ordered</string>
                 <string>successor/trade_state/delivered</string>
+                <string>delivery_builder/portal_deliveries/internal_packing_list_builder</string>
+                <string>delivery_builder/portal_deliveries/purchase_packing_list_builder</string>
+                <string>delivery_builder/portal_deliveries/sale_packing_list_builder</string>
               </tuple>
             </value>
         </item>
diff --git a/bt5/erp5_simulation_test/SkinTemplateItem/portal_skins/erp5_simulation_test/SaleOrder_selectMovement.xml b/bt5/erp5_simulation_test/SkinTemplateItem/portal_skins/erp5_simulation_test/SaleOrder_selectMovement.xml
deleted file mode 100644
index b23a125f86..0000000000
--- a/bt5/erp5_simulation_test/SkinTemplateItem/portal_skins/erp5_simulation_test/SaleOrder_selectMovement.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>Script_magic</string> </key>
-            <value> <int>3</int> </value>
-        </item>
-        <item>
-            <key> <string>_bind_names</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>_asgns</string> </key>
-                        <value>
-                          <dictionary>
-                            <item>
-                                <key> <string>name_container</string> </key>
-                                <value> <string>container</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_context</string> </key>
-                                <value> <string>context</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_m_self</string> </key>
-                                <value> <string>script</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_subpath</string> </key>
-                                <value> <string>traverse_subpath</string> </value>
-                            </item>
-                          </dictionary>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_body</string> </key>
-            <value> <string>from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery\n
-\n
-kw[\'query\'] = Query(portal_type=\'Simulation Movement\')\n
-kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
-\n
-#from Products.ERP5Type.Log import log\n
-#log(\'SaleOrder_selectMovement\', \'SQL\\n%s\' % context.Order_zSelectMovement(src__=1, **kw))\n
-\n
-if src__==0:\n
-  movement_list = [x.getObject() for x in context.Order_zSelectMovement(**kw)]\n
-  #log(\'SaleOrder_selectMovement\', \'mvt : %s\' % movement_list)\n
-  return movement_list\n
-else:\n
-  return context.Order_zSelectMovement(src__=1, **kw)\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>src__=0, **kw</string> </value>
-        </item>
-        <item>
-            <key> <string>_proxy_roles</string> </key>
-            <value>
-              <tuple>
-                <string>Manager</string>
-              </tuple>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>SaleOrder_selectMovement</string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string></string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_simulation_test/bt/revision b/bt5/erp5_simulation_test/bt/revision
index 410b14d2ce..978b4e8e51 100644
--- a/bt5/erp5_simulation_test/bt/revision
+++ b/bt5/erp5_simulation_test/bt/revision
@@ -1 +1 @@
-25
\ No newline at end of file
+26
\ No newline at end of file
-- 
2.30.9