From b9cc1896fae46c220edd27183e27958767aa9ac9 Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Wed, 29 Dec 2010 13:18:50 +0000
Subject: [PATCH] This script is now obsoleted, because if
 getPropertyDictFromContent return a different portal_type, the Event will
 migrate to this portal_type during discoverMetatada process. Contribution
 Predicates must focus on filename, content_type and content_type guessed from
 data criterions.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41858 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../crm_ingestion.xml                         |  4 +-
 .../IngestionFile_findTypeNameForEvent.xml    | 79 -------------------
 bt5/erp5_crm/bt/revision                      |  2 +-
 3 files changed, 2 insertions(+), 83 deletions(-)
 delete mode 100644 bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/IngestionFile_findTypeNameForEvent.xml

diff --git a/bt5/erp5_crm/PathTemplateItem/portal_contribution_registry/crm_ingestion.xml b/bt5/erp5_crm/PathTemplateItem/portal_contribution_registry/crm_ingestion.xml
index 5dbc24166c..1fcbd0d4e9 100644
--- a/bt5/erp5_crm/PathTemplateItem/portal_contribution_registry/crm_ingestion.xml
+++ b/bt5/erp5_crm/PathTemplateItem/portal_contribution_registry/crm_ingestion.xml
@@ -66,9 +66,7 @@
         <item>
             <key> <string>test_method_id</string> </key>
             <value>
-              <tuple>
-                <string>IngestionFile_findTypeNameForEvent</string>
-              </tuple>
+              <tuple/>
             </value>
         </item>
         <item>
diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/IngestionFile_findTypeNameForEvent.xml b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/IngestionFile_findTypeNameForEvent.xml
deleted file mode 100644
index 8a0a568c1b..0000000000
--- a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/IngestionFile_findTypeNameForEvent.xml
+++ /dev/null
@@ -1,79 +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.ERP5Type.Document import newTempEvent\n
-\n
-event = newTempEvent(context, \'subobject\', data=context.getData())\n
-\n
-# First, try to find portal type from content.\n
-portal_type = event.getPropertyDictFromContent().get(\'portal_type\', None)\n
-\n
-if portal_type is not None:\n
-  return portal_type\n
-\n
-# If we cannot find portal type from content, return default one defined in\n
-# predicate\n
-return predicate.getDestinationPortalType()\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>predicate</string> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>IngestionFile_findTypeNameForEvent</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_crm/bt/revision b/bt5/erp5_crm/bt/revision
index 37e6f1741c..1dd3380cdc 100644
--- a/bt5/erp5_crm/bt/revision
+++ b/bt5/erp5_crm/bt/revision
@@ -1 +1 @@
-515
\ No newline at end of file
+516
\ No newline at end of file
-- 
2.30.9