From 84949a53543fe7ae780127f4285f5ca3cfadb11e Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Thu, 6 Jan 2011 21:01:00 +0000
Subject: [PATCH] Include before script into workflow. This script will set
 some default properties into Business Configuration if those properties are
 None.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42096 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_standard_workflow/56.xml             |  4 +
 ...usinessConfiguration_setupStandardInit.xml | 73 +++++++++++++++++++
 bt5/erp5_configurator_standard/bt/revision    |  2 +-
 3 files changed, 78 insertions(+), 1 deletion(-)
 create mode 100644 bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_setupStandardInit.xml

diff --git a/bt5/erp5_configurator_standard/PathTemplateItem/workflow_module/erp5_standard_workflow/56.xml b/bt5/erp5_configurator_standard/PathTemplateItem/workflow_module/erp5_standard_workflow/56.xml
index 821d8a66f8..50f676d7f8 100644
--- a/bt5/erp5_configurator_standard/PathTemplateItem/workflow_module/erp5_standard_workflow/56.xml
+++ b/bt5/erp5_configurator_standard/PathTemplateItem/workflow_module/erp5_standard_workflow/56.xml
@@ -45,6 +45,10 @@
             <key> <string>after_script_id</string> </key>
             <value> <string>BusinessConfiguration_setupStandardBT5</string> </value>
         </item>
+        <item>
+            <key> <string>before_script_id</string> </key>
+            <value> <string>BusinessConfiguration_setupStandardInit</string> </value>
+        </item>
         <item>
             <key> <string>categories</string> </key>
             <value>
diff --git a/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_setupStandardInit.xml b/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_setupStandardInit.xml
new file mode 100644
index 0000000000..3e8820f301
--- /dev/null
+++ b/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_setupStandardInit.xml
@@ -0,0 +1,73 @@
+<?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># Update Business Configuration Properties if not set.\n
+\n
+if context.getUserInterfaceDescriptionFileId() is None:\n
+  context.setUserInterfaceDescriptionFileId("basic_configuration_ui_description.ods")\n
+\n
+if context.getConfigurationAfterScriptId() is None:\n
+  context.setConfigurationAfterScriptId(\'BusinessConfiguration_afterConfiguration\')\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**kw</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>BusinessConfiguration_setupStandardInit</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_configurator_standard/bt/revision b/bt5/erp5_configurator_standard/bt/revision
index 55a318f19d..4a722e9c7f 100644
--- a/bt5/erp5_configurator_standard/bt/revision
+++ b/bt5/erp5_configurator_standard/bt/revision
@@ -1 +1 @@
-551
\ No newline at end of file
+552
\ No newline at end of file
-- 
2.30.9