From 1e5c9302684d3c57ca38fa834554a0088f834963 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 12 Nov 2013 14:31:20 +0100
Subject: [PATCH] Make InventoryBrain a ZODB Extension

Signed-off-by: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
---
 .../Base_zGetNotGroupedMovementList.xml       |   2 +-
 bt5/erp5_accounting/bt/revision               |   2 +-
 .../Resource_zGetInventoryList.xml            |   2 +-
 bt5/erp5_banking_core/bt/revision             |   2 +-
 .../extension.erp5.InventoryBrain.py}         |   0
 .../extension.erp5.InventoryBrain.xml         | 129 ++++++++++++++++++
 .../erp5_core/Resource_zGetInventoryList.xml  |   6 +-
 .../Resource_zGetMovementHistoryList.xml      |   6 +-
 .../erp5_core/Resource_zGetTrackingList.xml   |   2 +-
 product/ERP5/bootstrap/erp5_core/bt/revision  |   2 +-
 .../erp5_core/bt/template_extension_id_list   |   3 +-
 11 files changed, 141 insertions(+), 15 deletions(-)
 rename product/ERP5/{Extensions/InventoryBrain.py => bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.py} (100%)
 create mode 100644 product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.xml

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_zGetNotGroupedMovementList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_zGetNotGroupedMovementList.xml
index 97966b008e..4e49d297fd 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_zGetNotGroupedMovementList.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_zGetNotGroupedMovementList.xml
@@ -34,7 +34,7 @@ at_date</string> </value>
         </item>
         <item>
             <key> <string>class_file_</string> </key>
-            <value> <string>ERP5.InventoryBrain</string> </value>
+            <value> <string>InventoryBrain</string> </value>
         </item>
         <item>
             <key> <string>class_name_</string> </key>
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index cd60bf8235..3e19de0156 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-1555
\ No newline at end of file
+1556
\ No newline at end of file
diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Resource_zGetInventoryList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Resource_zGetInventoryList.xml
index cc527a684c..6926343d96 100644
--- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Resource_zGetInventoryList.xml
+++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Resource_zGetInventoryList.xml
@@ -52,7 +52,7 @@ transformed_variation_text</string> </value>
         </item>
         <item>
             <key> <string>class_file_</string> </key>
-            <value> <string>ERP5.InventoryBrain</string> </value>
+            <value> <string>InventoryBrain</string> </value>
         </item>
         <item>
             <key> <string>class_name_</string> </key>
diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision
index 7b5a1ce4fd..ed615204d1 100644
--- a/bt5/erp5_banking_core/bt/revision
+++ b/bt5/erp5_banking_core/bt/revision
@@ -1 +1 @@
-589
\ No newline at end of file
+590
\ No newline at end of file
diff --git a/product/ERP5/Extensions/InventoryBrain.py b/product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.py
similarity index 100%
rename from product/ERP5/Extensions/InventoryBrain.py
rename to product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.py
diff --git a/product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.xml b/product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.xml
new file mode 100644
index 0000000000..3ae1fa2a1e
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Extension Component" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>default_reference</string> </key>
+            <value> <string>InventoryBrain</string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>extension.erp5.InventoryBrain</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Extension Component</string> </value>
+        </item>
+        <item>
+            <key> <string>sid</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>text_content_error_message</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>text_content_warning_message</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>version</string> </key>
+            <value> <string>erp5</string> </value>
+        </item>
+        <item>
+            <key> <string>workflow_history</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="PersistentMapping" module="Persistence.mapping"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>data</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>component_validation_workflow</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+                    </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="3" aka="AAAAAAAAAAM=">
+    <pickle>
+      <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
+    </pickle>
+    <pickle>
+      <tuple>
+        <none/>
+        <list>
+          <dictionary>
+            <item>
+                <key> <string>action</string> </key>
+                <value> <string>validate</string> </value>
+            </item>
+            <item>
+                <key> <string>actor</string> </key>
+                <value> <string>ERP5TypeTestCase</string> </value>
+            </item>
+            <item>
+                <key> <string>comment</string> </key>
+                <value> <string></string> </value>
+            </item>
+            <item>
+                <key> <string>time</string> </key>
+                <value>
+                  <object>
+                    <klass>
+                      <global name="DateTime" module="DateTime.DateTime"/>
+                    </klass>
+                    <tuple>
+                      <none/>
+                    </tuple>
+                    <state>
+                      <tuple>
+                        <float>1384253447.9</float>
+                        <string>GMT+1</string>
+                      </tuple>
+                    </state>
+                  </object>
+                </value>
+            </item>
+            <item>
+                <key> <string>validation_state</string> </key>
+                <value> <string>validated</string> </value>
+            </item>
+          </dictionary>
+        </list>
+      </tuple>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml
index c1ef86715d..8e1b0c99d8 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml
@@ -52,7 +52,7 @@ transformed_variation_text</string> </value>
         </item>
         <item>
             <key> <string>class_file_</string> </key>
-            <value> <string>ERP5.InventoryBrain</string> </value>
+            <value> <string>InventoryBrain</string> </value>
         </item>
         <item>
             <key> <string>class_name_</string> </key>
@@ -60,9 +60,7 @@ transformed_variation_text</string> </value>
         </item>
         <item>
             <key> <string>connection_hook</string> </key>
-            <value>
-              <none/>
-            </value>
+            <value> <string></string> </value>
         </item>
         <item>
             <key> <string>connection_id</string> </key>
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml
index 6bb261ae39..1e765ae473 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml
@@ -444,7 +444,7 @@ precision</string> </value>
         </item>
         <item>
             <key> <string>class_file_</string> </key>
-            <value> <string>ERP5.InventoryBrain</string> </value>
+            <value> <string>InventoryBrain</string> </value>
         </item>
         <item>
             <key> <string>class_name_</string> </key>
@@ -452,9 +452,7 @@ precision</string> </value>
         </item>
         <item>
             <key> <string>connection_hook</string> </key>
-            <value>
-              <none/>
-            </value>
+            <value> <string></string> </value>
         </item>
         <item>
             <key> <string>connection_id</string> </key>
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml
index e56436ceba..796364c8d8 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml
@@ -212,7 +212,7 @@ simulation_state_list:list</string> </value>
         </item>
         <item>
             <key> <string>class_file_</string> </key>
-            <value> <string>ERP5.InventoryBrain</string> </value>
+            <value> <string>InventoryBrain</string> </value>
         </item>
         <item>
             <key> <string>class_name_</string> </key>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index efbcc43d43..51290924d0 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-41137
\ No newline at end of file
+41138
\ No newline at end of file
diff --git a/product/ERP5/bootstrap/erp5_core/bt/template_extension_id_list b/product/ERP5/bootstrap/erp5_core/bt/template_extension_id_list
index 028dd3cdb5..43d5c6f1e1 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/template_extension_id_list
+++ b/product/ERP5/bootstrap/erp5_core/bt/template_extension_id_list
@@ -1,2 +1,3 @@
 extension.erp5.StandardSecurity
-extension.erp5.DocumentExtraction
\ No newline at end of file
+extension.erp5.DocumentExtraction
+extension.erp5.InventoryBrain
\ No newline at end of file
-- 
2.30.9