From 83e6cf73418f469e5b0cc3e14e2385394d9f5d04 Mon Sep 17 00:00:00 2001
From: Ayush Tiwari <ayush.tiwari@nexedi.com>
Date: Wed, 13 Dec 2017 11:43:09 +0100
Subject: [PATCH] [erp5_egov_mysql_innodb_catalog]: Re-export Catalog Methods

---
 .../z0_drop_birth_detail.xml                  |  6 ++-
 .../erp5_mysql_innodb/z0_drop_egov.xml        |  6 ++-
 ...catalog_birth_detail_list.catalog_keys.xml |  6 ---
 .../z_catalog_birth_detail_list.xml           | 45 +++++++++++++++++-
 .../z_catalog_egov_list.catalog_keys.xml      |  9 ----
 .../erp5_mysql_innodb/z_catalog_egov_list.xml | 47 ++++++++++++++++++-
 .../z_create_birth_detail.xml                 |  6 ++-
 .../erp5_mysql_innodb/z_create_egov.xml       |  6 ++-
 .../z_uncatalog_birth_detail.xml              |  6 ++-
 .../erp5_mysql_innodb/z_uncatalog_egov.xml    |  6 ++-
 10 files changed, 120 insertions(+), 23 deletions(-)

diff --git a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_birth_detail.xml b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_birth_detail.xml
index cee9383081..891194dcfa 100644
--- a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_birth_detail.xml
+++ b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_birth_detail.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+      <global name="SQL Method" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -56,6 +56,10 @@
             <key> <string>max_rows_</string> </key>
             <value> <int>1000</int> </value>
         </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>SQL Method</string> </value>
+        </item>
         <item>
             <key> <string>title</string> </key>
             <value> <string></string> </value>
diff --git a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_egov.xml b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_egov.xml
index be92b16490..45250a1bc5 100644
--- a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_egov.xml
+++ b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_egov.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+      <global name="SQL Method" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -56,6 +56,10 @@
             <key> <string>max_rows_</string> </key>
             <value> <int>1000</int> </value>
         </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>SQL Method</string> </value>
+        </item>
         <item>
             <key> <string>title</string> </key>
             <value> <string></string> </value>
diff --git a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_birth_detail_list.catalog_keys.xml b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_birth_detail_list.catalog_keys.xml
index 6e81651809..c95a68655e 100644
--- a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_birth_detail_list.catalog_keys.xml
+++ b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_birth_detail_list.catalog_keys.xml
@@ -2,10 +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.getPortalType() == 'Person'</value>
- </item>
 </catalog_method>
diff --git a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_birth_detail_list.xml b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_birth_detail_list.xml
index 78613888e9..d67407d3e4 100644
--- a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_birth_detail_list.xml
+++ b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_birth_detail_list.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+      <global name="SQL Method" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -40,6 +40,26 @@ getBirthplaceAddressCity</string> </value>
             <key> <string>connection_id</string> </key>
             <value> <string>erp5_sql_connection</string> </value>
         </item>
+        <item>
+            <key> <string>expression</string> </key>
+            <value> <string>python: context.getPortalType() == \'Person\'</string> </value>
+        </item>
+        <item>
+            <key> <string>expression_cache_key</string> </key>
+            <value>
+              <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>z_catalog_birth_detail_list</string> </value>
@@ -52,10 +72,33 @@ getBirthplaceAddressCity</string> </value>
             <key> <string>max_rows_</string> </key>
             <value> <int>1000</int> </value>
         </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>SQL Method</string> </value>
+        </item>
         <item>
             <key> <string>title</string> </key>
             <value> <string></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.getPortalType() == \'Person\'</string> </value>
+        </item>
       </dictionary>
     </pickle>
   </record>
diff --git a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_egov_list.catalog_keys.xml b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_egov_list.catalog_keys.xml
index 86cefcf9c2..c95a68655e 100644
--- a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_egov_list.catalog_keys.xml
+++ b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_egov_list.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.getPortalType() in ('Organisation', 'Assignment') or (lambda type_info: type_info is not None and type_info.getPortalType() == 'EGov Type')(context.getTypeInfo())</value>
- </item>
- <item key="_filter_expression_cache_key_archive" type="tuple">
-  <value>portal_type</value>
- </item>
 </catalog_method>
diff --git a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_egov_list.xml b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_egov_list.xml
index d55ce104af..31a9a1b14b 100644
--- a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_egov_list.xml
+++ b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_egov_list.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+      <global name="SQL Method" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -47,6 +47,28 @@ modification_date </string> </value>
             <key> <string>connection_id</string> </key>
             <value> <string>erp5_sql_connection</string> </value>
         </item>
+        <item>
+            <key> <string>expression</string> </key>
+            <value> <string>python: context.getPortalType() in (\'Organisation\', \'Assignment\') or (lambda type_info: type_info is not None and type_info.getPortalType() == \'EGov Type\')(context.getTypeInfo())</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>z_catalog_egov_list</string> </value>
@@ -59,10 +81,33 @@ modification_date </string> </value>
             <key> <string>max_rows_</string> </key>
             <value> <int>1000</int> </value>
         </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>SQL Method</string> </value>
+        </item>
         <item>
             <key> <string>title</string> </key>
             <value> <string></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.getPortalType() in (\'Organisation\', \'Assignment\') or (lambda type_info: type_info is not None and type_info.getPortalType() == \'EGov Type\')(context.getTypeInfo())</string> </value>
+        </item>
       </dictionary>
     </pickle>
   </record>
diff --git a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_birth_detail.xml b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_birth_detail.xml
index 0a7c904596..f708ffc253 100644
--- a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_birth_detail.xml
+++ b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_birth_detail.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+      <global name="SQL Method" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -56,6 +56,10 @@
             <key> <string>max_rows_</string> </key>
             <value> <int>1000</int> </value>
         </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>SQL Method</string> </value>
+        </item>
         <item>
             <key> <string>title</string> </key>
             <value> <string></string> </value>
diff --git a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_egov.xml b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_egov.xml
index 5edc7103f3..ea5e622e18 100644
--- a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_egov.xml
+++ b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_egov.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+      <global name="SQL Method" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -56,6 +56,10 @@
             <key> <string>max_rows_</string> </key>
             <value> <int>1000</int> </value>
         </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>SQL Method</string> </value>
+        </item>
         <item>
             <key> <string>title</string> </key>
             <value> <string></string> </value>
diff --git a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_uncatalog_birth_detail.xml b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_uncatalog_birth_detail.xml
index 01aace48cc..70a31617c0 100644
--- a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_uncatalog_birth_detail.xml
+++ b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_uncatalog_birth_detail.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+      <global name="SQL Method" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -50,6 +50,10 @@
             <key> <string>max_rows_</string> </key>
             <value> <int>1000</int> </value>
         </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>SQL Method</string> </value>
+        </item>
         <item>
             <key> <string>title</string> </key>
             <value> <string></string> </value>
diff --git a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_uncatalog_egov.xml b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_uncatalog_egov.xml
index 60d99925b3..d2fdaa7249 100644
--- a/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_uncatalog_egov.xml
+++ b/bt5/erp5_egov_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_uncatalog_egov.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+      <global name="SQL Method" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -50,6 +50,10 @@
             <key> <string>max_rows_</string> </key>
             <value> <int>1000</int> </value>
         </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>SQL Method</string> </value>
+        </item>
         <item>
             <key> <string>title</string> </key>
             <value> <string></string> </value>
-- 
2.30.9