From 9cc9bcd5b335842b8123613a8e4ce0de11df0191 Mon Sep 17 00:00:00 2001
From: Lucas Carvalho <lucas@nexedi.com>
Date: Mon, 31 Jan 2011 18:00:50 +0000
Subject: [PATCH] Initial import of erp5_demo_smb. You can use this bt5 to
 configure your fresh instance with everything required by
 erp5_configurator_standard.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42843 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_alarms/setup_demo_smb.xml          | 101 ++++++++++++++++++
 .../portal_skins/erp5_demo_smb.xml            |  26 +++++
 .../Alarm_installBusinessTemplateList.xml     |  80 ++++++++++++++
 .../Alarm_setupBusinessConfiguration.xml      |  73 +++++++++++++
 .../Alarm_setupDemoConfiguration.xml          |  79 ++++++++++++++
 .../Base_getDemoSMBBusinessTemplateList.xml   |  87 +++++++++++++++
 bt5/erp5_demo_smb/bt/change_log               |   2 +
 bt5/erp5_demo_smb/bt/copyright_list           |   1 +
 bt5/erp5_demo_smb/bt/license                  |   1 +
 bt5/erp5_demo_smb/bt/maintainer_list          |   1 +
 bt5/erp5_demo_smb/bt/revision                 |   1 +
 bt5/erp5_demo_smb/bt/template_format_version  |   1 +
 bt5/erp5_demo_smb/bt/template_path_list       |   1 +
 bt5/erp5_demo_smb/bt/template_skin_id_list    |   1 +
 bt5/erp5_demo_smb/bt/title                    |   1 +
 15 files changed, 456 insertions(+)
 create mode 100644 bt5/erp5_demo_smb/PathTemplateItem/portal_alarms/setup_demo_smb.xml
 create mode 100644 bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb.xml
 create mode 100644 bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_installBusinessTemplateList.xml
 create mode 100644 bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_setupBusinessConfiguration.xml
 create mode 100644 bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_setupDemoConfiguration.xml
 create mode 100644 bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Base_getDemoSMBBusinessTemplateList.xml
 create mode 100644 bt5/erp5_demo_smb/bt/change_log
 create mode 100644 bt5/erp5_demo_smb/bt/copyright_list
 create mode 100644 bt5/erp5_demo_smb/bt/license
 create mode 100644 bt5/erp5_demo_smb/bt/maintainer_list
 create mode 100644 bt5/erp5_demo_smb/bt/revision
 create mode 100644 bt5/erp5_demo_smb/bt/template_format_version
 create mode 100644 bt5/erp5_demo_smb/bt/template_path_list
 create mode 100644 bt5/erp5_demo_smb/bt/template_skin_id_list
 create mode 100644 bt5/erp5_demo_smb/bt/title

diff --git a/bt5/erp5_demo_smb/PathTemplateItem/portal_alarms/setup_demo_smb.xml b/bt5/erp5_demo_smb/PathTemplateItem/portal_alarms/setup_demo_smb.xml
new file mode 100644
index 0000000000..d310be162e
--- /dev/null
+++ b/bt5/erp5_demo_smb/PathTemplateItem/portal_alarms/setup_demo_smb.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Alarm" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>active_sense_method_id</string> </key>
+            <value> <string>Alarm_setupDemoConfiguration</string> </value>
+        </item>
+        <item>
+            <key> <string>alarm_notification_mode</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string>Alarm used to setup a demo of SMB.</string> </value>
+        </item>
+        <item>
+            <key> <string>enabled</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>setup_demo_smb</string> </value>
+        </item>
+        <item>
+            <key> <string>periodicity_hour</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>periodicity_minute</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>periodicity_minute_frequency</string> </key>
+            <value> <int>10</int> </value>
+        </item>
+        <item>
+            <key> <string>periodicity_month</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>periodicity_month_day</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>periodicity_start_date</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="DateTime" module="DateTime.DateTime"/>
+                </klass>
+                <tuple>
+                  <none/>
+                </tuple>
+                <state>
+                  <tuple>
+                    <float>1262307660.0</float>
+                    <string>GMT</string>
+                  </tuple>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>periodicity_week</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Alarm</string> </value>
+        </item>
+        <item>
+            <key> <string>sense_method_id</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Setup Demo SMB Configuration</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb.xml b/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb.xml
new file mode 100644
index 0000000000..1c351479cb
--- /dev/null
+++ b/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Folder" module="OFS.Folder"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_objects</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>erp5_demo_smb</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_installBusinessTemplateList.xml b/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_installBusinessTemplateList.xml
new file mode 100644
index 0000000000..1646e2ca7a
--- /dev/null
+++ b/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_installBusinessTemplateList.xml
@@ -0,0 +1,80 @@
+<?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>"""\n
+"""\n
+portal = context.getPortalObject()\n
+portal.portal_templates.updateRepositoryBusinessTemplateList(\n
+                              [\'http://www.erp5.org/dists/snapshot/bt5/\'])\n
+business_template_list = context.Base_getDemoSMBBusinessTemplateList()\n
+\n
+kw = dict(tag="start")\n
+for business_template_id in business_template_list:\n
+  portal.portal_templates.activate(**kw).installBusinessTemplatesFromRepositories((business_template_id,))\n
+  kw["after_tag"] = kw["tag"]\n
+  kw["tag"] = business_template_id\n
+\n
+return kw\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**kw</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Alarm_installBusinessTemplateList</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_setupBusinessConfiguration.xml b/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_setupBusinessConfiguration.xml
new file mode 100644
index 0000000000..0d4f21accc
--- /dev/null
+++ b/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_setupBusinessConfiguration.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>"""\n
+ Creates a default business configuration.\n
+"""\n
+portal = context.getPortalObject()\n
+return portal.business_configuration_module.newContent(portal_type="Business Configuration",\n
+                                                               title=\'Default Demo Business Configuration\',\n
+                                                               resource=\'workflow_module/erp5_standard_workflow\')\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Alarm_setupBusinessConfiguration</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_setupDemoConfiguration.xml b/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_setupDemoConfiguration.xml
new file mode 100644
index 0000000000..e9f5d797ca
--- /dev/null
+++ b/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Alarm_setupDemoConfiguration.xml
@@ -0,0 +1,79 @@
+<?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.ERP5Type.Log import log\n
+log(\'Launching activities to setup the demo configuration!\')\n
+\n
+kw = {}\n
+installed_business_template_list = context.portal_templates.getInstalledBusinessTemplateTitleList()\n
+\n
+if \'erp5_configurator_standard\' not in installed_business_template_list:\n
+  kw = context.Alarm_installBusinessTemplateList()\n
+\n
+context.activate(**kw).Alarm_setupBusinessConfiguration()\n
+\n
+log(\'Finished to launch the activities to setup the demo configuration!\')\n
+context.setEnabled(False)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Alarm_setupDemoConfiguration</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Base_getDemoSMBBusinessTemplateList.xml b/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Base_getDemoSMBBusinessTemplateList.xml
new file mode 100644
index 0000000000..7d0e54926f
--- /dev/null
+++ b/bt5/erp5_demo_smb/SkinTemplateItem/portal_skins/erp5_demo_smb/Base_getDemoSMBBusinessTemplateList.xml
@@ -0,0 +1,87 @@
+<?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>return (\'erp5_base\',\n
+        \'erp5_simulation\',\n
+        \'erp5_dhtml_style\',\n
+        \'erp5_jquery\',\n
+        \'erp5_jquery_ui\',\n
+        \'erp5_web\',\n
+        \'erp5_ingestion\',\n
+        \'erp5_ingestion_mysql_innodb_catalog\',        \n
+        \'erp5_accounting\', \n
+        \'erp5_dms\', \n
+        \'erp5_knowledge_pad\',\n
+        \'erp5_pdm\',\n
+        \'erp5_crm\',\n
+        \'erp5_trade\',\n
+        \'erp5_tax_resource\', \n
+        \'erp5_discount_resource\',\n
+        \'erp5_invoicing\',\n
+        \'erp5_workflow\',\n
+        \'erp5_configurator\',\n
+        \'erp5_configurator_standard_categories\',\n
+        \'erp5_configurator_standard\',)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Base_getDemoSMBBusinessTemplateList</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_demo_smb/bt/change_log b/bt5/erp5_demo_smb/bt/change_log
new file mode 100644
index 0000000000..616bc7dfd5
--- /dev/null
+++ b/bt5/erp5_demo_smb/bt/change_log
@@ -0,0 +1,2 @@
+24-01-2011 lucas
+* Initial import.
\ No newline at end of file
diff --git a/bt5/erp5_demo_smb/bt/copyright_list b/bt5/erp5_demo_smb/bt/copyright_list
new file mode 100644
index 0000000000..fe948b9fb7
--- /dev/null
+++ b/bt5/erp5_demo_smb/bt/copyright_list
@@ -0,0 +1 @@
+Copyright (c) 2010 Nexedi SA
\ No newline at end of file
diff --git a/bt5/erp5_demo_smb/bt/license b/bt5/erp5_demo_smb/bt/license
new file mode 100644
index 0000000000..3a3e12bcad
--- /dev/null
+++ b/bt5/erp5_demo_smb/bt/license
@@ -0,0 +1 @@
+GPL
\ No newline at end of file
diff --git a/bt5/erp5_demo_smb/bt/maintainer_list b/bt5/erp5_demo_smb/bt/maintainer_list
new file mode 100644
index 0000000000..d91e34ca85
--- /dev/null
+++ b/bt5/erp5_demo_smb/bt/maintainer_list
@@ -0,0 +1 @@
+lucas
\ No newline at end of file
diff --git a/bt5/erp5_demo_smb/bt/revision b/bt5/erp5_demo_smb/bt/revision
new file mode 100644
index 0000000000..b5045cc404
--- /dev/null
+++ b/bt5/erp5_demo_smb/bt/revision
@@ -0,0 +1 @@
+21
\ No newline at end of file
diff --git a/bt5/erp5_demo_smb/bt/template_format_version b/bt5/erp5_demo_smb/bt/template_format_version
new file mode 100644
index 0000000000..56a6051ca2
--- /dev/null
+++ b/bt5/erp5_demo_smb/bt/template_format_version
@@ -0,0 +1 @@
+1
\ No newline at end of file
diff --git a/bt5/erp5_demo_smb/bt/template_path_list b/bt5/erp5_demo_smb/bt/template_path_list
new file mode 100644
index 0000000000..05407987a3
--- /dev/null
+++ b/bt5/erp5_demo_smb/bt/template_path_list
@@ -0,0 +1 @@
+portal_alarms/setup_demo_smb
\ No newline at end of file
diff --git a/bt5/erp5_demo_smb/bt/template_skin_id_list b/bt5/erp5_demo_smb/bt/template_skin_id_list
new file mode 100644
index 0000000000..bcfaa8b383
--- /dev/null
+++ b/bt5/erp5_demo_smb/bt/template_skin_id_list
@@ -0,0 +1 @@
+erp5_demo_smb
\ No newline at end of file
diff --git a/bt5/erp5_demo_smb/bt/title b/bt5/erp5_demo_smb/bt/title
new file mode 100644
index 0000000000..bcfaa8b383
--- /dev/null
+++ b/bt5/erp5_demo_smb/bt/title
@@ -0,0 +1 @@
+erp5_demo_smb
\ No newline at end of file
-- 
2.30.9