diff --git a/product/ERP5/mixin/movement_generator.py b/product/ERP5/mixin/movement_generator.py index 4c03f4a3703d45885a2f9ff8560eecaabf169670..89569c6fde93bbf476e4609cedd82e0e82eabf1c 100644 --- a/product/ERP5/mixin/movement_generator.py +++ b/product/ERP5/mixin/movement_generator.py @@ -62,14 +62,14 @@ class MovementGeneratorMixin: """Returns list of tuples (movement, business_path)""" input_movement_list = self._getInputMovementList(context) business_process = context.getBusinessProcessValue() + trade_phase_list = context.getSpecialiseValue().getTradePhaseList() # 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] input_movement_and_path_list = [] business_path_list = [] - trade_phase_list = context.getSpecialiseValue().getTradePhaseList() for input_movement in input_movement_list: for business_path in business_process.getPathValueList( trade_phase_list,