Commit 69f861f1 authored by Sebastien Robin's avatar Sebastien Robin

when search for field libraries, also take into account current

folder even if it was not used yet with any business template

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35851 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 813320b7
...@@ -737,13 +737,13 @@ class ERP5Form(ZMIForm, ZopePageTemplate): ...@@ -737,13 +737,13 @@ class ERP5Form(ZMIForm, ZopePageTemplate):
""" """
folder_id = self.aq_parent.id folder_id = self.aq_parent.id
# Find a business template which manages the context skin folder. # Find a business template which manages the context skin folder.
folder_id_list = [] folder_id_set = set([folder_id])
for template in self.portal_templates.getInstalledBusinessTemplateList(): for template in self.portal_templates.getInstalledBusinessTemplateList():
template_skin_id_list = template.getTemplateSkinIdList() template_skin_id_list = template.getTemplateSkinIdList()
if folder_id in template_skin_id_list: if folder_id in template_skin_id_list:
folder_id_list.extend(template_skin_id_list) folder_id_set.update(set(template_skin_id_list))
break break
return folder_id_list return list(folder_id_set)
#Methods for Proxify tab. #Methods for Proxify tab.
security.declareProtected('View management screens', 'getFormFieldList') security.declareProtected('View management screens', 'getFormFieldList')
......
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