From d08246332cd790fe95756a7e3a7f8ebc40e00be3 Mon Sep 17 00:00:00 2001
From: Ayush Tiwari <ayush.tiwari@nexedi.com>
Date: Wed, 13 Jul 2016 16:20:09 +0000
Subject: [PATCH] erp5_catalog: Add Portal Script portal_type in allowed_types
 for ERP5 Catalog

---
 .../allowed_content_types.xml                                  | 3 +++
 .../bt/template_portal_type_allowed_content_type_list          | 3 ++-
 product/ERP5Catalog/ERP5Catalog.py                             | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_catalog_transition/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml b/product/ERP5/bootstrap/erp5_catalog_transition/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
index 50b2e9a92f..2de31baf03 100644
--- a/product/ERP5/bootstrap/erp5_catalog_transition/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
+++ b/product/ERP5/bootstrap/erp5_catalog_transition/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
@@ -1,4 +1,7 @@
 <allowed_content_type_list>
+ <portal_type id="Catalog">
+  <item>Python Script</item>
+ </portal_type>
  <portal_type id="Catalog Tool">
   <item>Catalog</item>
  </portal_type>
diff --git a/product/ERP5/bootstrap/erp5_catalog_transition/bt/template_portal_type_allowed_content_type_list b/product/ERP5/bootstrap/erp5_catalog_transition/bt/template_portal_type_allowed_content_type_list
index 92791fbacd..49e508c184 100644
--- a/product/ERP5/bootstrap/erp5_catalog_transition/bt/template_portal_type_allowed_content_type_list
+++ b/product/ERP5/bootstrap/erp5_catalog_transition/bt/template_portal_type_allowed_content_type_list
@@ -1 +1,2 @@
-Catalog Tool | Catalog
\ No newline at end of file
+Catalog Tool | Catalog
+Catalog | Python Script
\ No newline at end of file
diff --git a/product/ERP5Catalog/ERP5Catalog.py b/product/ERP5Catalog/ERP5Catalog.py
index 899afc0f6d..81b8cf8592 100644
--- a/product/ERP5Catalog/ERP5Catalog.py
+++ b/product/ERP5Catalog/ERP5Catalog.py
@@ -52,7 +52,7 @@ class ERP5Catalog(Folder, Catalog):
 
   meta_type = "ERP5 Catalog"
   portal_type = 'Catalog'
-  allowed_types = ()
+  allowed_types = ('Python Script',)
   #TODO(low priority): Add an icon to display at ERP5 Zope interface
   icon = None
   # Activate isRADContent cause we need to generate accessors and default values
-- 
2.30.9