Commit d15e9d4e authored by Romain Courteaud's avatar Romain Courteaud

ERP5Form: show more related proxy fields

parent 25e0fd0d
......@@ -850,7 +850,8 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate):
skins_tool = self.portal_skins
folder_id = self.aq_parent.id
for skin_folder_id in self.getSimilarSkinFolderIdList():
# for skin_folder_id in self.getSimilarSkinFolderIdList():
for skin_folder_id in self.getPortalObject().portal_skins.objectIds():
iterate(getattr(skins_tool, skin_folder_id))
iterate(skins_tool.erp5_core)
return form_list
......@@ -1017,7 +1018,6 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate):
form_id = self.id
proxy_dict = {}
for document in self.objectValues():
if document.meta_type == 'ProxyField':
short_path = "%s.%s" % (form_id, document.id)
proxy_dict[short_path] = {'proxy': document,
'short_path': short_path,
......@@ -1040,7 +1040,8 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate):
skins_tool = self.portal_skins
proxy_dict_list = []
if len(proxy_dict):
for skin_folder_id in self.getSimilarSkinFolderIdList():
# for skin_folder_id in self.getSimilarSkinFolderIdList():
for skin_folder_id in self.getPortalObject().portal_skins.objectIds():
iterate(getattr(skins_tool, skin_folder_id))
proxy_dict_list = proxy_dict.values()
proxy_dict_list.sort(key=lambda x: x['short_path'])
......
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