Commit 99dab8c0 authored by Romain Courteaud's avatar Romain Courteaud

Only change code layout.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3699 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent de6ce777
...@@ -519,16 +519,18 @@ class ERP5Site ( CMFSite, FolderMixIn ): ...@@ -519,16 +519,18 @@ class ERP5Site ( CMFSite, FolderMixIn ):
security.declareProtected(Permissions.AccessContentsInformation, 'getDefaultModuleId') security.declareProtected(Permissions.AccessContentsInformation, 'getDefaultModuleId')
def getDefaultModuleId(self, portal_type): def getDefaultModuleId(self, portal_type):
""" """
Return default module id where a object with portal_type can be created Return default module id where a object with portal_type can
be created.
""" """
# XXX very dummy method, but it works with today name convention # Very dummy method, but it works with today name convention.
module_name = portal_type.lower().replace(' ','_') module_name = portal_type.lower().replace(' ','_')
portal_object = self portal_object = self
if not hasattr(portal_object, module_name): if not hasattr(portal_object, module_name):
module_name += '_module' module_name += '_module'
if not hasattr(portal_object, module_name): if not hasattr(portal_object, module_name):
LOG('ERP5Site, getDefaultModuleId',0,'Unable to find default module for portal_type: %s' % portal_type ) LOG('ERP5Site, getDefaultModuleId', 0,
'Unable to find default module for portal_type: %s' % \
portal_type)
raise raise
return module_name return module_name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment