Commit 9fe6d1eb authored by Jean-Paul Smets's avatar Jean-Paul Smets

initial checkin


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1161 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee1029ed
## Script (Python) "SupplyLine_asCellRange"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
## Script (Python) "TemplateTool_baseCategoriesAsCSV"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
category_dict = {}
for bt in context.portal_templates.contentValues(filter={'portal_type':'Business Template'}):
category_dict[bt.getTitle()] = {}
for category in bt.getTemplateBaseCategoryList():
category_dict[bt.getTitle()][category] = 1
bt_list = category_dict.keys()
bt_list.sort()
category_list = []
for category in context.portal_categories.objectValues():
category_list.append(category.getId())
category_list.sort()
msg = ','.join([''] + bt_list) + '\n'
for category in category_list:
msg += category
for bt in bt_list:
msg += category in category_dict[bt] and ',X' or ','
msg += '\n'
return msg
## Script (Python) "TemplateTool_modulesAsCSV"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
module_dict = {}
for bt in context.portal_templates.contentValues(filter={'portal_type':'Business Template'}):
module_dict[bt.getTitle()] = {}
for id in bt.getTemplateModuleIdList():
module_dict[bt.getTitle()][id] = 1
bt_list = module_dict.keys()
bt_list.sort()
module_list = []
for module in context.getPortalObject().contentValues(filter={'meta_type':'ERP5 Folder'}):
module_list.append(module.getId())
module_list.sort()
msg = ','.join([''] + bt_list) + '\n'
for module in module_list:
msg += module
for bt in bt_list:
msg += module in module_dict[bt] and ',X' or ','
msg += '\n'
return msg
## Script (Python) "TemplateTool_portalTypesAsCSV"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
portal_type_dict = {}
for bt in context.portal_templates.contentValues(filter={'portal_type':'Business Template'}):
portal_type_dict[bt.getTitle()] = {}
for id in bt.getTemplatePortalTypeIdList():
portal_type_dict[bt.getTitle()][id] = 1
bt_list = portal_type_dict.keys()
bt_list.sort()
portal_type_list = []
for t in context.portal_types.objectValues():
portal_type_list.append(t.id)
portal_type_list.sort()
msg = ','.join([''] + bt_list) + '\n'
for type in portal_type_list:
msg += type
for bt in bt_list:
msg += type in portal_type_dict[bt] and ',X' or ','
msg += '\n'
return msg
## Script (Python) "TemplateTool_workflowsAsCSV"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
workflow_dict = {}
for bt in context.portal_templates.contentValues(filter={'portal_type':'Business Template'}):
workflow_dict[bt.getTitle()] = {}
for id in bt.getTemplateWorkflowIdList():
workflow_dict[bt.getTitle()][id] = 1
bt_list = workflow_dict.keys()
bt_list.sort()
workflow_list = []
for wf in context.portal_workflow.objectValues():
workflow_list.append(wf.getId())
workflow_list.sort()
msg = ','.join([''] + bt_list) + '\n'
for wf in workflow_list:
msg += wf
for bt in bt_list:
msg += wf in workflow_dict[bt] and ',X' or ','
msg += '\n'
return msg
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