Commit d65092e9 authored by Fabien Morin's avatar Fabien Morin

add sorting


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27291 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9b5a5a5e
......@@ -120,7 +120,6 @@ class TradeCondition(Path, Transformation):
Reference of Trade Model Line is used to hide other Trade Model Line
In chain first found Trade Model Line has precedence
Context's, if not None, Trade Model Lines have precedence
XXX - the sorting is missing
"""
visited_trade_condition_list = []
def findSpecialiseValueList(context):
......@@ -134,6 +133,9 @@ class TradeCondition(Path, Transformation):
specialise_value_list.extend(findSpecialiseValueList(specialise))
return specialise_value_list
def sortByIntIndex(a, b):
return cmp(a.getIntIndex(), b.getIntIndex())
reference_list = []
trade_model_line_composed_list = []
containting_object_list = []
......@@ -153,6 +155,8 @@ class TradeCondition(Path, Transformation):
if reference not in reference_list:
trade_model_line_composed_list.append(trade_model_line)
reference_list.append(reference)
trade_model_line_composed_list.sort(sortByIntIndex)
return trade_model_line_composed_list
def getAggregatedAmountList(self, context, **kw):
......
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