diff --git a/product/ERP5/Document/TradeModelLine.py b/product/ERP5/Document/TradeModelLine.py
index 782c92b9b16e827031d3acd4cf989cf521c6fb0b..c8ca072e3bdca4e0c3789e7b480db2d3b1762ef9 100644
--- a/product/ERP5/Document/TradeModelLine.py
+++ b/product/ERP5/Document/TradeModelLine.py
@@ -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