[Erp5-report] r39874 nicolas.dumazet - /erp5/trunk/products/ERP5Type/Tool/TypesTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Nov 4 07:14:10 CET 2010
Author: nicolas.dumazet
Date: Thu Nov 4 07:14:08 2010
New Revision: 39874
URL: http://svn.erp5.org?rev=39874&view=rev
Log:
getInterfaceTypeList for Base_view
Modified:
erp5/trunk/products/ERP5Type/Tool/TypesTool.py
Modified: erp5/trunk/products/ERP5Type/Tool/TypesTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Tool/TypesTool.py?rev=39874&r1=39873&r2=39874&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Tool/TypesTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Tool/TypesTool.py [utf8] Thu Nov 4 07:14:08 2010
@@ -16,6 +16,7 @@
##############################################################################
import imp, sys, warnings
+import inspect
from itertools import chain
import zope.interface
from Acquisition import aq_base
@@ -201,11 +202,19 @@ class TypesTool(TypeProvider):
security.declareProtected(Permissions.AccessContentsInformation, 'getMixinTypeList')
def getMixinTypeList(self):
"""
- Return a list of classes names that can be used as Mixins
+ Return a list of class names that can be used as Mixins
"""
from Products.ERP5Type import mixin_class_registry
return sorted(mixin_class_registry)
+ security.declareProtected(Permissions.AccessContentsInformation, 'getInterfaceTypeList')
+ def getInterfaceTypeList(self):
+ """
+ Return a list of class names that can be used as Interfaces
+ """
+ from Products.ERP5Type import interfaces
+ return [name for name, cls in inspect.getmembers(interfaces, inspect.isclass)]
+
security.declareProtected(Permissions.AddPortalContent, 'listDefaultTypeInformation')
def listDefaultTypeInformation(self):
# FIXME: This method is only used by manage_addTypeInformation below, and
More information about the Erp5-report
mailing list