diff --git a/product/ERP5/Document/TradeModelLine.py b/product/ERP5/Document/TradeModelLine.py index 4a40684748744a484f9b08d12e641d4b9ad8f0f7..7e400ad6a00dc0fbf25e3fed1111f0ae8f7b2b0b 100644 --- a/product/ERP5/Document/TradeModelLine.py +++ b/product/ERP5/Document/TradeModelLine.py @@ -89,7 +89,7 @@ class TradeModelLine(Predicate, XMLMatrix, Amount): script_name = self.getCalculationScriptId() if script_name is None: # if model line script is None, get the default model script - model = context.getSpecialiseValue().getEffectiveModel() + model = self.getParentValue() script_name = model.getCalculationScriptId() if script_name is None: return None