[Erp5-report] r39601 kazuhiko - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Oct 28 14:17:08 CEST 2010


Author: kazuhiko
Date: Thu Oct 28 14:17:04 2010
New Revision: 39601

URL: http://svn.erp5.org?rev=39601&view=rev
Log:
fix the condition to check portal type or not, because some module portal types has 'ERP5 Folder' meta type, thus we can loose allowed_content_types etc. by updating PortalTypeTemplateItem.

Modified:
    erp5/trunk/products/ERP5/Document/BusinessTemplate.py

Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=39601&r1=39600&r2=39601&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Thu Oct 28 14:17:04 2010
@@ -1033,7 +1033,7 @@ class ObjectTemplateItem(BaseTemplateIte
             subobjects_dict = self._backupObject(action, trashbin,
                                                  container_path, object_id)
             # in case of portal types, we want to keep some properties
-            if getattr(old_obj, 'meta_type', None) == 'ERP5 Base Type':
+            if interfaces.ITypeProvider.providedBy(container):
               for attr in ('allowed_content_types',
                            'hidden_content_type_list',
                            'property_sheet_list',




More information about the Erp5-report mailing list