Commit 7ff29a2f authored by Fabien Morin's avatar Fabien Morin

movement are not caracterised by there resource : two movements in a same line...

movement are not caracterised by there resource : two movements in a same line can have the sameresource, but they are not the same movement. VariationCategoryList permit to better select movements.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26953 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8b6e6b4f
...@@ -78,7 +78,9 @@ class TradeCondition(Path, Transformation): ...@@ -78,7 +78,9 @@ class TradeCondition(Path, Transformation):
for p in self.edited_property_list: for p in self.edited_property_list:
update_kw[p] = amount.getProperty(p) update_kw[p] = amount.getProperty(p)
for movement in existing_movement_list: for movement in existing_movement_list:
if movement.getProperty('resource') == update_kw['resource']: if movement.getProperty('resource') == update_kw['resource'] and\
movement.getVariationCategoryList() == \
amount.getVariationCategoryList():
movement.edit(**update_kw) movement.edit(**update_kw)
modified_resource_list.append(update_kw['resource']) modified_resource_list.append(update_kw['resource'])
return [amount for amount in aggregated_amount_list if return [amount for amount in aggregated_amount_list if
......
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