Commit 939c9828 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

treat as non-BPM case if trade_phase is missing.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32182 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 73e78312
...@@ -62,14 +62,14 @@ class MovementGeneratorMixin: ...@@ -62,14 +62,14 @@ class MovementGeneratorMixin:
"""Returns list of tuples (movement, business_path)""" """Returns list of tuples (movement, business_path)"""
input_movement_list = self._getInputMovementList(context) input_movement_list = self._getInputMovementList(context)
business_process = context.getBusinessProcessValue() business_process = context.getBusinessProcessValue()
trade_phase_list = context.getSpecialiseValue().getTradePhaseList()
# In non-BPM case, we have no business path. # In non-BPM case, we have no business path.
if business_process is None: if business_process is None or len(trade_phase_list) == 0:
return [(input_movement, None) for input_movement in input_movement_list] return [(input_movement, None) for input_movement in input_movement_list]
input_movement_and_path_list = [] input_movement_and_path_list = []
business_path_list = [] business_path_list = []
trade_phase_list = context.getSpecialiseValue().getTradePhaseList()
for input_movement in input_movement_list: for input_movement in input_movement_list:
for business_path in business_process.getPathValueList( for business_path in business_process.getPathValueList(
trade_phase_list, trade_phase_list,
......
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