[Erp5-report] r26953 - /erp5/trunk/products/ERP5/Document/TradeCondition.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 13 16:45:29 CEST 2009
Author: fabien
Date: Wed May 13 16:45:25 2009
New Revision: 26953
URL: http://svn.erp5.org?rev=26953&view=rev
Log:
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.
Modified:
erp5/trunk/products/ERP5/Document/TradeCondition.py
Modified: erp5/trunk/products/ERP5/Document/TradeCondition.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TradeCondition.py?rev=26953&r1=26952&r2=26953&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeCondition.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeCondition.py [utf8] Wed May 13 16:45:25 2009
@@ -78,7 +78,9 @@
for p in self.edited_property_list:
update_kw[p] = amount.getProperty(p)
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)
modified_resource_list.append(update_kw['resource'])
return [amount for amount in aggregated_amount_list if
More information about the Erp5-report
mailing list