Commit ebf96793 authored by Rafael Monnerat's avatar Rafael Monnerat

Fix business template name and include business process.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44904 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aae69bf6
......@@ -56,7 +56,7 @@ from Products.ERP5Type.Log import log\n
\n
portal = context.getPortalObject()\n
portal_preferences = portal.portal_preferences\n
business_template = context.portal_templates.getInstalledBusinessTemplate("erp5_maxma_testcase")\n
business_template = portal_templates.getInstalledBusinessTemplate("erp5_demo_maxma_sample")\n
N_ = context.Base_translateString\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
\n
......@@ -81,20 +81,21 @@ if business_template is not None:\n
for path in business_template.getTemplatePathList():\n
obj = context.getPortalObject().restrictedTraverse(path, None)\n
if obj is not None and hasattr(obj, \'getPortalType\'):\n
if obj.getPortalType() in (\'Person\', \n
\'Organisation\', \n
\'Account\', \n
if obj.getPortalType() in (\'Person\',\n
\'Organisation\',\n
\'Business Process\',\n
\'Account\',\n
\'Service\', \'Product\',\n
\'Sale Trade Condition\', \n
\'Purchase Trade Condition\',\n
\'Order Root Simulation Rule\', \n
\'Delivery Root Simulation Rule\',\n
\'Trade Model Simulation Rule\', \n
\'Sale Trade Condition\',\n
\'Purchase Trade Condition\'\n
\'Order Root Simulation Rule\',\n
\'Delivery Root Simulation Rule\'\n
\'Trade Model Simulation Rule\',\n
\'Accounting Transaction Root Simulation Rule\',\n
\'Invoice Transaction Simulation Rule\', \n
\'Invoice Transaction Simulation Rule\',\n
\'Payment Simulation Rule\',\n
\'Invoice Root Simulation Rule\', \n
\'Delivery Simulation Rule\', \n
\'Invoice Root Simulation Rule\',\n
\'Delivery Simulation Rule\',\n
\'Invoice Simulation Rule\'):\n
\n
for period in obj.contentValues(filter={\'portal_type\':\'Accounting Period\'}):\n
......@@ -105,7 +106,7 @@ if business_template is not None:\n
assignment.updateLocalRolesOnSecurityGroups()\n
print "\\tOpen (assignment): ", assignment.getRelativeUrl()\n
\n
for gadget in context.portal_gadgets.objectValues():\n
for gadget in context.portal_gadgets.objectValues():\n
if gadget.getValidationState() == \'invisible\':\n
gadget.visible()\n
gadget.public()\n
......
13
\ No newline at end of file
14
\ No newline at end of file
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