Commit 0a792e58 authored by Arnaud Fontaine's avatar Arnaud Fontaine Committed by Sebastien Robin

Make BusinessProcess temporary SM a child of its AR rather than Trade Model Path.

getTradePhaseMovementList() returns temporary SM with appropriate arrow
and dates but these temporary SM have their corresponding Trade Model
Path as a parent which means that Simulation Movement API is partially
unuseable (such as getting parent Applied Rule...).

Moreover, it seems strange for a Simulation Movement to not be a child
of an Applied Rule.

Therefore, create the temporary SM as a child of its corresponding AR.
parent 68b4823c
......@@ -691,7 +691,7 @@ class BusinessProcess(Path, XMLObject):
filter_trade_phase = frozenset(trade_phase).intersection
for trade_model_path in self.getTradeModelPathValueList(context=amount, trade_phase=trade_phase):
id_index += 1
movement = newTempSimulationMovement(trade_model_path,
movement = newTempSimulationMovement(explanation,
'%s_%s' % (base_id, id_index), notify_workflow=False)
kw = self._getPropertyAndCategoryDict(explanation, amount, trade_model_path, delay_mode=delay_mode)
trade_phase = filter_trade_phase(trade_model_path.getTradePhaseList())
......
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