From ec95f32249e247da946f346f26adcfacb901857e Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Tue, 10 Aug 2004 11:28:46 +0000 Subject: [PATCH] Initial import. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1337 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Extensions/CheckPortalTypes.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 product/ERP5/Extensions/CheckPortalTypes.py diff --git a/product/ERP5/Extensions/CheckPortalTypes.py b/product/ERP5/Extensions/CheckPortalTypes.py new file mode 100755 index 0000000000..3f0d9e8e34 --- /dev/null +++ b/product/ERP5/Extensions/CheckPortalTypes.py @@ -0,0 +1,12 @@ +from Globals import get_request +from Products.CMFCore.utils import getToolByName + +def fixProductNames(self, REQUEST=None): + msg = '' + portal_types = getToolByName(self, 'portal_types') + for contentType in portal_types.listTypeInfo(): + if hasattr(contentType, 'product'): + if contentType.product in ('ERP5', 'Coramy', 'Nexedi'): + msg += 'Change the Product Name of %s from %s to ERP5Type\n' % (contentType.getId(), contentType.product) + contentType.product = 'ERP5Type' + return msg -- 2.30.9