Commit ded6c7e6 authored by Jérome Perrin's avatar Jérome Perrin

Set the title of the module to module_title, don't guess it from portal type

name.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17201 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 52b4ee5f
...@@ -331,7 +331,8 @@ def ERP5Site_createModuleScribus(self, form_id=None, module_portal_type=None, ...@@ -331,7 +331,8 @@ def ERP5Site_createModuleScribus(self, form_id=None, module_portal_type=None,
ManageModule.registerModule(portal, ManageModule.registerModule(portal,
module_id, module_id,
module_portal_type, module_portal_type,
object_portal_type) object_portal_type,
module_title)
# manage redirection URL # manage redirection URL
......
...@@ -83,6 +83,7 @@ class ManageModule: ...@@ -83,6 +83,7 @@ class ManageModule:
object_names['view_pdf'] = temp_portal_type + '_view' +\ object_names['view_pdf'] = temp_portal_type + '_view' +\
temp_portal_type + 'AsPdf' temp_portal_type + 'AsPdf'
# declaring form to list the objects of a module # declaring form to list the objects of a module
# TODO: use module portal type, not "object title + Module"
object_names['view_list'] = object_title.replace(' ','') +\ object_names['view_list'] = object_title.replace(' ','') +\
'Module_view' + temp_portal_type + 'List' 'Module_view' + temp_portal_type + 'List'
# declaring main object form # declaring main object form
...@@ -469,16 +470,14 @@ class ManageModule: ...@@ -469,16 +470,14 @@ class ManageModule:
portal, portal,
module_id, module_id,
module_portal_type, module_portal_type,
object_portal_type): object_portal_type,
module_title):
""" """
register Module inside ERP5 instance register Module inside ERP5 instance
""" """
title_module = ''
for word in object_portal_type.split():
title_module += str(word.capitalize() + ' ')
portal.newContent( id = str(module_id), portal.newContent( id = str(module_id),
portal_type = str(module_portal_type), portal_type = str(module_portal_type),
title = title_module) title = module_title)
class ManageFiles: class ManageFiles:
......
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