Commit fd9824d8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

sometimes we want to refer trade model line itself in the calculation script.

ideally, the context for the script should be the trade model line here, but unfortunately it is the passed context (i.e. a simulation movement).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33520 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed34a554
No related merge requests found
......@@ -343,11 +343,18 @@ class TradeModelLine(Predicate, XMLMatrix, Amount):
tmp_movement = calculation_script(
current_aggregated_amount_list=movement_list,
current_movement=tmp_movement)
else:
elif calculation_script.func_code.co_argcount==3:
# backward compatibility
tmp_movement = calculation_script(
current_aggregated_amount_list=movement_list,
current_movement=tmp_movement,
aggregated_movement_list=aggregated_movement_list)
else:
tmp_movement = calculation_script(
current_aggregated_amount_list=movement_list,
current_movement=tmp_movement,
aggregated_movement_list=aggregated_movement_list,
trade_model_line=self)
if tmp_movement is None:
# Do nothing
return aggregated_amount_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