From 19f668a6fdd415ab6ad75bf3144e0c04f53da52c Mon Sep 17 00:00:00 2001
From: Ayush Tiwari <ayush.tiwari@nexedi.com>
Date: Wed, 13 Dec 2017 11:42:08 +0100
Subject: [PATCH] [erp5_dms_conversion_catalog]: Re-export Catalog Methods

---
 ...og_preConvertDocumentList.catalog_keys.xml |  9 ----
 .../SQLCatalog_preConvertDocumentList.xml     | 47 ++++++++++++++++++-
 2 files changed, 46 insertions(+), 10 deletions(-)

diff --git a/bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.catalog_keys.xml b/bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.catalog_keys.xml
index 0aed3cdab6..c95a68655e 100644
--- a/bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.catalog_keys.xml
+++ b/bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.catalog_keys.xml
@@ -2,13 +2,4 @@
  <item key="sql_catalog_object_list" type="int">
   <value>1</value>
  </item>
- <item key="_is_filtered_archive" type="int">
-  <value>1</value>
- </item>
- <item key="_filter_expression_archive" type="str">
-  <value>python: context.isDocument()</value>
- </item>
- <item key="_filter_expression_cache_key_archive" type="tuple">
-  <value>portal_type</value>
- </item>
 </catalog_method>
diff --git a/bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.xml b/bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.xml
index d2860b21b5..c293b3b132 100644
--- a/bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.xml
+++ b/bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+      <global name="Python Script" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -52,14 +52,59 @@
             <key> <string>_params</string> </key>
             <value> <string>uid, getRelativeUrl</string> </value>
         </item>
+        <item>
+            <key> <string>expression</string> </key>
+            <value> <string>python: context.isDocument()</string> </value>
+        </item>
+        <item>
+            <key> <string>expression_cache_key</string> </key>
+            <value>
+              <tuple>
+                <string>portal_type</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>expression_instance</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>filtered</string> </key>
+            <value> <int>1</int> </value>
+        </item>
         <item>
             <key> <string>id</string> </key>
             <value> <string>SQLCatalog_preConvertDocumentList</string> </value>
         </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Python Script</string> </value>
+        </item>
         <item>
             <key> <string>title</string> </key>
             <value> <string>Catalog the ways to produce all variations of a Resource</string> </value>
         </item>
+        <item>
+            <key> <string>type</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="Expression" module="Products.CMFCore.Expression"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>python: context.isDocument()</string> </value>
+        </item>
       </dictionary>
     </pickle>
   </record>
-- 
2.30.9