Commit 1ea8f462 authored by Arnaud Fontaine's avatar Arnaud Fontaine Committed by Romain Courteaud

SQUASH configurator

parent 189490d9
...@@ -13,15 +13,14 @@ def migrateToERP5Workflow(portal_workflow, configurator_workflow): ...@@ -13,15 +13,14 @@ def migrateToERP5Workflow(portal_workflow, configurator_workflow):
for o in category_value_list ] for o in category_value_list ]
workflow = portal_workflow.newContent( workflow = portal_workflow.newContent(
id=workflow_id,
portal_type='Workflow', portal_type='Workflow',
reference=configurator_workflow.getId(), reference=configurator_workflow.getId(),
comment=configurator_workflow.getComment(), comment=configurator_workflow.getComment(),
description=configurator_workflow.getDescription(), description=configurator_workflow.getDescription(),
state_variable=configurator_workflow.getProperty('state_variable_name'),
source_list=getCategoryList('state_', configurator_workflow.getSourceValueList()), source_list=getCategoryList('state_', configurator_workflow.getSourceValueList()),
# ConfiguratorWorkflow PropertySheet # ConfiguratorWorkflow PropertySheet
configuration_after_script_id=configurator_workflow.getConfigurationAfterScriptId(), configuration_after_script_id=configurator_workflow.getConfigurationAfterScriptId())
state_base_category=configurator_workflow.getStateBaseCategory())
for business_configuration in configurator_workflow.getRelatedValueList( for business_configuration in configurator_workflow.getRelatedValueList(
portal_type='Business Configuration'): portal_type='Business Configuration'):
business_configuration.setResourceValue(workflow) business_configuration.setResourceValue(workflow)
...@@ -32,7 +31,6 @@ def migrateToERP5Workflow(portal_workflow, configurator_workflow): ...@@ -32,7 +31,6 @@ def migrateToERP5Workflow(portal_workflow, configurator_workflow):
if subobject.getPortalType() == 'State': if subobject.getPortalType() == 'State':
state = workflow.newContent( state = workflow.newContent(
id='state_' + reference,
portal_type='State', portal_type='State',
reference=reference, reference=reference,
title=title, title=title,
...@@ -45,7 +43,6 @@ def migrateToERP5Workflow(portal_workflow, configurator_workflow): ...@@ -45,7 +43,6 @@ def migrateToERP5Workflow(portal_workflow, configurator_workflow):
elif subobject.getPortalType() == 'Transition': elif subobject.getPortalType() == 'Transition':
workflow.newContent( workflow.newContent(
id='transition_' + reference,
portal_type='Transition', portal_type='Transition',
reference=reference, reference=reference,
title=title, title=title,
...@@ -70,7 +67,6 @@ def migrateToERP5Workflow(portal_workflow, configurator_workflow): ...@@ -70,7 +67,6 @@ def migrateToERP5Workflow(portal_workflow, configurator_workflow):
continue continue
workflow.newContent( workflow.newContent(
id='variable_' + reference,
portal_type='Workflow Variable', portal_type='Workflow Variable',
reference=reference, reference=reference,
title=title, title=title,
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</item> </item>
<item> <item>
<key> <string>state_variable</string> </key> <key> <string>state_variable</string> </key>
<value> <string>simulation_state</string> </value> <value> <string>current_state</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</item> </item>
<item> <item>
<key> <string>state_variable</string> </key> <key> <string>state_variable</string> </key>
<value> <string>simulation_state</string> </value> <value> <string>current_state</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</item> </item>
<item> <item>
<key> <string>state_variable</string> </key> <key> <string>state_variable</string> </key>
<value> <string>simulation_state</string> </value> <value> <string>current_state</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</item> </item>
<item> <item>
<key> <string>state_variable</string> </key> <key> <string>state_variable</string> </key>
<value> <string>simulation_state</string> </value> <value> <string>current_state</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</item> </item>
<item> <item>
<key> <string>state_variable</string> </key> <key> <string>state_variable</string> </key>
<value> <string>simulation_state</string> </value> <value> <string>current_state</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</item> </item>
<item> <item>
<key> <string>state_variable</string> </key> <key> <string>state_variable</string> </key>
<value> <string>simulation_state</string> </value> <value> <string>current_state</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
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