Commit 60c3150b authored by Fabien Morin's avatar Fabien Morin

current model_line should be a child of an effictive model. So it's useless to...

current model_line should be a child of an effictive model. So it's useless to look for an effective model : the parent of this line is good.
it's non sens to use another model than the parent one to get the calculation script to calculate this line.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28042 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 002ac06b
No related merge requests found
......@@ -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
......
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