From 9b4d41864f926bc684403c756e1182207a38989e Mon Sep 17 00:00:00 2001
From: Yoshinori Okuji <yo@nexedi.com>
Date: Sun, 8 Aug 2010 07:00:01 +0000
Subject: [PATCH] 2010-08-08 yo * Update the id of the business process in
 scripts. * Make more scripts for select movement methods, as OrderBuilder
 does not pass which builder is used.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37636 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../test_advanced_sale_invoice_builder.xml    |   2 +-
 ...anced_sale_invoice_trade_model_builder.xml |   2 +-
 .../test_sale_packing_list_builder.xml        |   2 +-
 .../Alarm_activateTestInvoiceBuild.xml        |   2 +-
 .../Alarm_activateTestShippingBuild.xml       |   2 +-
 ...AdvancedSaleInvoiceBuilderMovementList.xml | 126 ++++++++++++++++++
 ...leInvoiceTradeModelBuilderMovementList.xml | 126 ++++++++++++++++++
 ...TestSalePackingListBuilderMovementList.xml | 126 ++++++++++++++++++
 .../bt/change_log                             |   4 +
 .../bt/revision                               |   2 +-
 10 files changed, 388 insertions(+), 6 deletions(-)
 create mode 100644 bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestAdvancedSaleInvoiceBuilderMovementList.xml
 create mode 100644 bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestAdvancedSaleInvoiceTradeModelBuilderMovementList.xml
 create mode 100644 bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestSalePackingListBuilderMovementList.xml

diff --git a/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_advanced_sale_invoice_builder.xml b/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_advanced_sale_invoice_builder.xml
index e998a130e0..e8b50c3b94 100644
--- a/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_advanced_sale_invoice_builder.xml
+++ b/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_advanced_sale_invoice_builder.xml
@@ -86,7 +86,7 @@
         </item>
         <item>
             <key> <string>simulation_select_method_id</string> </key>
-            <value> <string>DeliveryBuilder_getSimulationPerformanceTestBuildableMovementList</string> </value>
+            <value> <string>ERP5Site_getTestAdvancedSaleInvoiceBuilderMovementList</string> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_advanced_sale_invoice_trade_model_builder.xml b/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_advanced_sale_invoice_trade_model_builder.xml
index ab6b874c07..bb29d2d27d 100644
--- a/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_advanced_sale_invoice_trade_model_builder.xml
+++ b/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_advanced_sale_invoice_trade_model_builder.xml
@@ -88,7 +88,7 @@
         </item>
         <item>
             <key> <string>simulation_select_method_id</string> </key>
-            <value> <string>DeliveryBuilder_getSimulationPerformanceTestBuildableMovementList</string> </value>
+            <value> <string>ERP5Site_getTestAdvancedSaleInvoiceTradeModelBuilderMovementList</string> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_sale_packing_list_builder.xml b/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_sale_packing_list_builder.xml
index 3f02116fc8..d9e2f18694 100644
--- a/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_sale_packing_list_builder.xml
+++ b/bt5/erp5_simulation_performance_test/PathTemplateItem/portal_deliveries/test_sale_packing_list_builder.xml
@@ -86,7 +86,7 @@
         </item>
         <item>
             <key> <string>simulation_select_method_id</string> </key>
-            <value> <string>DeliveryBuilder_getSimulationPerformanceTestBuildableMovementList</string> </value>
+            <value> <string>ERP5Site_getTestSalePackingListBuilderMovementList</string> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/Alarm_activateTestInvoiceBuild.xml b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/Alarm_activateTestInvoiceBuild.xml
index 305c69e8f5..a3b7c1c84b 100644
--- a/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/Alarm_activateTestInvoiceBuild.xml
+++ b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/Alarm_activateTestInvoiceBuild.xml
@@ -57,7 +57,7 @@
 \n
 now = DateTime().timeTime()\n
 module = context.getPortalObject().business_process_module\n
-business_process = module.test_business_process\n
+business_process = module.test_bp\n
 invoice_business_path = business_process.invoice\n
 invoice_builder = invoice_business_path.getDeliveryBuilderValue()\n
 tax_business_path = business_process.tax\n
diff --git a/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/Alarm_activateTestShippingBuild.xml b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/Alarm_activateTestShippingBuild.xml
index 74ce37aee6..5a4b769a84 100644
--- a/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/Alarm_activateTestShippingBuild.xml
+++ b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/Alarm_activateTestShippingBuild.xml
@@ -54,7 +54,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>module = context.getPortalObject().business_process_module\n
-business_path = module.test_business_process.shipping\n
+business_path = module.test_bp.shipping\n
 delivery_builder = business_path.getDeliveryBuilderValue()\n
 \n
 # Make sure that multiple builds would not run in parallel.\n
diff --git a/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestAdvancedSaleInvoiceBuilderMovementList.xml b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestAdvancedSaleInvoiceBuilderMovementList.xml
new file mode 100644
index 0000000000..ea284a725d
--- /dev/null
+++ b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestAdvancedSaleInvoiceBuilderMovementList.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </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>delivery_builder = context.portal_deliveries.test_advanced_sale_invoice_builder\n
+return delivery_builder.DeliveryBuilder_getSimulationPerformanceTestBuildableMovementList(**kw)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**kw</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>delivery_builder</string>
+                            <string>_apply_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>ERP5Site_getTestAdvancedSaleInvoiceBuilderMovementList</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestAdvancedSaleInvoiceTradeModelBuilderMovementList.xml b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestAdvancedSaleInvoiceTradeModelBuilderMovementList.xml
new file mode 100644
index 0000000000..c3e636e480
--- /dev/null
+++ b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestAdvancedSaleInvoiceTradeModelBuilderMovementList.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </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>delivery_builder = context.portal_deliveries.test_advanced_sale_invoice_trade_model_builder\n
+return delivery_builder.DeliveryBuilder_getSimulationPerformanceTestBuildableMovementList(**kw)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**kw</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>delivery_builder</string>
+                            <string>_apply_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>ERP5Site_getTestAdvancedSaleInvoiceTradeModelBuilderMovementList</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestSalePackingListBuilderMovementList.xml b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestSalePackingListBuilderMovementList.xml
new file mode 100644
index 0000000000..4e7e738220
--- /dev/null
+++ b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/ERP5Site_getTestSalePackingListBuilderMovementList.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </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>delivery_builder = context.portal_deliveries.test_sale_packing_list_builder\n
+return delivery_builder.DeliveryBuilder_getSimulationPerformanceTestBuildableMovementList(**kw)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**kw</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>delivery_builder</string>
+                            <string>_apply_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>ERP5Site_getTestSalePackingListBuilderMovementList</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_simulation_performance_test/bt/change_log b/bt5/erp5_simulation_performance_test/bt/change_log
index ecfc5874b3..1e93dd98f2 100644
--- a/bt5/erp5_simulation_performance_test/bt/change_log
+++ b/bt5/erp5_simulation_performance_test/bt/change_log
@@ -1,3 +1,7 @@
+2010-08-08 yo
+* Update the id of the business process in scripts.
+* Make more scripts for select movement methods, as OrderBuilder does not pass which builder is used.
+
 2010-08-08 yo
 * Add helper scripts to deal with divergence in a legacy way.
 
diff --git a/bt5/erp5_simulation_performance_test/bt/revision b/bt5/erp5_simulation_performance_test/bt/revision
index 7813681f5b..301160a930 100644
--- a/bt5/erp5_simulation_performance_test/bt/revision
+++ b/bt5/erp5_simulation_performance_test/bt/revision
@@ -1 +1 @@
-5
\ No newline at end of file
+8
\ No newline at end of file
-- 
2.30.9