Commit 9ee53dd7 authored by Fabien Morin's avatar Fabien Morin

- Fix a mistake : if a movement should be kept, this does not mean that we...

- Fix a mistake : if a movement should be kept, this does not mean that we don't have to check for other movements. So in this way all movement will be checked.
- in case of no effective model found, getEffectiveModel return None. So remove all None values


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28120 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d4f37f4a
......@@ -97,7 +97,7 @@ class TradeCondition(Path, Transformation, XMLMatrix):
len(set(normal_use_list).intersection(set(resource\
.getUseList()))):
keep_movement = True
break
continue
for amount in aggregated_amount_list:
# if movement is generated and if not exist, append to delete list
update_kw = {}
......@@ -322,6 +322,7 @@ class TradeCondition(Path, Transformation, XMLMatrix):
visited_trade_condition_list = [model.getEffectiveModel(\
start_date=start_date, stop_date=stop_date) for model in\
model_list]
effecive_model_list = [ob for ob in effecive_model_list if ob is not None]
while len(effecive_model_list) != 0:
specialise = effecive_model_list.pop(0)
effective_specialise = specialise.getEffectiveModel(start_date=start_date,
......
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