[Erp5-report] r22242 - /erp5/trunk/products/ERP5/Document/
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jul 3 13:12:49 CEST 2008
Author: luke
Date: Thu Jul 3 13:12:43 2008
New Revision: 22242
URL: http://svn.erp5.org?rev=22242&view=rev
Log:
- use getNetQuantity to support transformations' efficiency
Modified:
erp5/trunk/products/ERP5/Document/TransformationRule.py
erp5/trunk/products/ERP5/Document/TransformationSourcingRule.py
Modified: erp5/trunk/products/ERP5/Document/TransformationRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TransformationRule.py?rev=22242&r1=22241&r2=22242&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TransformationRule.py (original)
+++ erp5/trunk/products/ERP5/Document/TransformationRule.py Thu Jul 3 13:12:43 2008
@@ -201,7 +201,7 @@
'stop_date': stop_date,
"resource": parent_movement.getResource(),
# XXX Is the quantity value correct ?
- "quantity": parent_movement.getQuantity(),
+ "quantity": parent_movement.getNetQuantity(), # getNetQuantity to support efficency from transformation
"quantity_unit": parent_movement.getQuantityUnit(),
"destination_list": (),
"destination_section_list": (),
@@ -253,7 +253,7 @@
resource_price = amount.getResourcePrice()
price = None
if resource_price is not None:
- price = amount.getQuantity() * resource_price
+ price = amount.getNetQuantity() * resource_price # getNetQuantity to support efficency from transformation
consumed_movement_dict[consumed_mvt_id] = {
'start_date': current_supply_link.calculateStartDate(stop_date),
'stop_date': stop_date,
@@ -262,7 +262,7 @@
amount.getVariationCategoryList(),
"variation_property_dict": \
amount.getVariationPropertyDict(),
- "quantity": amount.getQuantity() * parent_movement.getQuantity(),
+ "quantity": amount.getNetQuantity() * parent_movement.getQuantity(), # getNetQuantity to support efficency from transformation
"price": price,
"quantity_unit": amount.getQuantityUnit(),
"destination_list": (),
Modified: erp5/trunk/products/ERP5/Document/TransformationSourcingRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TransformationSourcingRule.py?rev=22242&r1=22241&r2=22242&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TransformationSourcingRule.py (original)
+++ erp5/trunk/products/ERP5/Document/TransformationSourcingRule.py Thu Jul 3 13:12:43 2008
@@ -194,7 +194,7 @@
getVariationCategoryList(),
"variation_property_dict": \
parent_movement.getVariationPropertyDict(),
- 'quantity': parent_movement.getQuantity(),
+ 'quantity': parent_movement.getNetQuantity(), # getNetQuantity to support efficency from transformation
'price': parent_movement.getPrice(),
'quantity_unit': parent_movement.getQuantityUnit(),
'start_date': previous_supply_link.calculateStartDate(stop_date),
More information about the Erp5-report
mailing list