Commit d3648027 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ERP5Workflow: No need for Transition Variables on Interactions, never used in ERP5 (!1378).

parent e79a6eef
...@@ -311,11 +311,6 @@ class InteractionDefinition (SimpleItem): ...@@ -311,11 +311,6 @@ class InteractionDefinition (SimpleItem):
return [] return []
return self.portal_type_group_filter return self.portal_type_group_filter
def getTransitionVariableValueList(self):
if self.var_exprs is None:
return []
return self.var_exprs
showDict = Base.showDict showDict = Base.showDict
convertToERP5Workflow = convertToERP5Workflow convertToERP5Workflow = convertToERP5Workflow
......
...@@ -73,9 +73,6 @@ ...@@ -73,9 +73,6 @@
<item>SQL Non Continuous Increasing Id Generator</item> <item>SQL Non Continuous Increasing Id Generator</item>
<item>ZODB Continuous Increasing Id Generator</item> <item>ZODB Continuous Increasing Id Generator</item>
</portal_type> </portal_type>
<portal_type id="Interaction">
<item>Transition Variable</item>
</portal_type>
<portal_type id="Interaction Workflow"> <portal_type id="Interaction Workflow">
<item>Interaction Workflow Interaction</item> <item>Interaction Workflow Interaction</item>
<item>Workflow Script</item> <item>Workflow Script</item>
......
...@@ -53,9 +53,7 @@ ...@@ -53,9 +53,7 @@
<item> <item>
<key> <string>bottom</string> </key> <key> <string>bottom</string> </key>
<value> <value>
<list> <list/>
<string>listbox</string>
</list>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -37,7 +37,6 @@ Id Tool | ZODB Continuous Increasing Id Generator ...@@ -37,7 +37,6 @@ Id Tool | ZODB Continuous Increasing Id Generator
Interaction Workflow | Interaction Workflow Interaction Interaction Workflow | Interaction Workflow Interaction
Interaction Workflow | Workflow Script Interaction Workflow | Workflow Script
Interaction Workflow | Workflow Variable Interaction Workflow | Workflow Variable
Interaction | Transition Variable
Memcached Tool | Memcached Plugin Memcached Tool | Memcached Plugin
Preference Tool Type | Action Information Preference Tool Type | Action Information
Preference Tool Type | Role Information Preference Tool Type | Role Information
......
...@@ -244,16 +244,13 @@ class InteractionWorkflow(Workflow): ...@@ -244,16 +244,13 @@ class InteractionWorkflow(Workflow):
sci = None sci = None
# Update variables. # Update variables.
tdef_exprs = {v.getId(): v for v in tdef.getTransitionVariableValueList()}
status = {} status = {}
for vdef in workflow_variable_list: for vdef in workflow_variable_list:
id_ = vdef.getId() id_ = vdef.getId()
if not vdef.getStatusIncluded(): if not vdef.getStatusIncluded():
continue continue
expression = None expression = None
if id_ in tdef_exprs: if not vdef.getAutomaticUpdate() and id_ in former_status:
expression = tdef_exprs[id_]
elif not vdef.getAutomaticUpdate() and id_ in former_status:
# Preserve former value # Preserve former value
value = former_status[id_] value = former_status[id_]
else: else:
......
...@@ -117,11 +117,3 @@ class InteractionWorkflowInteraction(IdAsReferenceMixin('interaction_'), ...@@ -117,11 +117,3 @@ class InteractionWorkflowInteraction(IdAsReferenceMixin('interaction_'),
prefix_length = len('before_commit_script/') prefix_length = len('before_commit_script/')
return [path[prefix_length:] for path in self.getCategoryList() return [path[prefix_length:] for path in self.getCategoryList()
if path.startswith('before_commit_script/')] if path.startswith('before_commit_script/')]
security.declareProtected(Permissions.AccessContentsInformation,
'getTransitionVariableValueList')
def getTransitionVariableValueList(self):
"""
Return Transition Variables
"""
return self.objectValues(portal_type='Transition Variable')
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