Commit 7f68a76a authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_adminstration: Extend what can be ignored

See merge request !1477
parents 764aba45 3d31a305
if ignore_business_template_list is None:
ignore_business_template_list = []
for business_template in sorted(context.getPortalObject().portal_templates.contentValues(portal_type='Business Template'), for business_template in sorted(context.getPortalObject().portal_templates.contentValues(portal_type='Business Template'),
key=lambda x:x.getTitle()): key=lambda x:x.getTitle()):
if business_template.getInstallationState() == 'installed': if business_template.getInstallationState() == 'installed' and \
business_template.getTitle() not in ignore_business_template_list:
print business_template.getTitle() print business_template.getTitle()
return printed return printed
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>ignore_business_template_list=None</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
import hashlib import hashlib
portal = context.getPortalObject() portal = context.getPortalObject()
if ignore_folder_list is None:
ignore_folder_list = []
if ignore_skin_list is None:
ignore_skin_list = []
if ignore_custom:
ignore_folder_list.append("custom")
def getSkinHash(skin, skin_container): def getSkinHash(skin, skin_container):
content = '' content = ''
...@@ -24,9 +32,11 @@ def getSkinHash(skin, skin_container): ...@@ -24,9 +32,11 @@ def getSkinHash(skin, skin_container):
for skin_folder in portal.portal_skins.objectValues('Folder'): for skin_folder in portal.portal_skins.objectValues('Folder'):
if ignore_custom and skin_folder.getId() == 'custom': if skin_folder.getId() in ignore_folder_list:
continue continue
for skin in skin_folder.objectValues(): for skin in skin_folder.objectValues():
if skin.getId() in ignore_skin_list:
continue
print getSkinHash(skin, skin_folder) print getSkinHash(skin, skin_folder)
if include_workflow_scripts: if include_workflow_scripts:
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>ignore_custom=True, include_workflow_scripts=True</string> </value> <value> <string>ignore_custom=True, include_workflow_scripts=True, ignore_folder_list=None, ignore_skin_list=None</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
if ignore_property_sheet_list is None:
ignore_property_sheet_list = []
for ps in sorted(context.getPortalObject().portal_property_sheets.contentValues(), key=lambda x:x.getId()): for ps in sorted(context.getPortalObject().portal_property_sheets.contentValues(), key=lambda x:x.getId()):
for pd in sorted(ps.contentValues(), key=lambda x:x.getId()): for pd in sorted(ps.contentValues(), key=lambda x:x.getId()):
ps_id = ps.getId()
if ps_id in ignore_property_sheet_list:
continue
print ps.getId() print ps.getId()
info_list = ['id', 'portal_type', 'reference'] info_list = ['id', 'portal_type', 'reference']
std_prop_list = ['elementary_type', 'property_default', 'storage_id', 'multivaluated', 'range', 'preference', 'read_permission', 'write_permission', 'translatable', 'translation_domain'] std_prop_list = ['elementary_type', 'property_default', 'storage_id', 'multivaluated', 'range', 'preference', 'read_permission', 'write_permission', 'translatable', 'translation_domain']
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>ignore_property_sheet_list=None</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -10,5 +10,8 @@ ...@@ -10,5 +10,8 @@
skin_tool = context.getPortalObject().portal_skins skin_tool = context.getPortalObject().portal_skins
for name, layers in skin_tool.getSkinPaths(): for name, layers in skin_tool.getSkinPaths():
for layer in layers.split(','): for layer in layers.split(','):
if ignore_skin_folder_list is not None and\
layer in ignore_skin_folder_list:
continue
print '%s,%s' % (name, layer) print '%s,%s' % (name, layer)
return printed return printed
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>ignore_skin_folder_list=None</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
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