[Erp5-report] r30021 - in /erp5/trunk/products/ERP5: Document/ PropertySheet/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 27 09:14:00 CET 2009
Author: tatuya
Date: Tue Oct 27 09:13:55 2009
New Revision: 30021
URL: http://svn.erp5.org?rev=30021&view=rev
Log:
revert r30019 Trade Model Line changing until discussion concludes
Modified:
erp5/trunk/products/ERP5/Document/TradeModelLine.py
erp5/trunk/products/ERP5/PropertySheet/TradeModelLine.py
Modified: erp5/trunk/products/ERP5/Document/TradeModelLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TradeModelLine.py?rev=30021&r1=30020&r2=30021&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeModelLine.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeModelLine.py [utf8] Tue Oct 27 09:13:55 2009
@@ -201,7 +201,6 @@
'stop_date': context.getStopDate(),
'create_line': self.isCreateLine(),
'trade_phase_list': self.getTradePhaseList(),
- 'efficiency': self.getEfficiency(),
}
common_params.update(property_dict)
@@ -224,7 +223,6 @@
variation_base_category_list = cell.getVariationBaseCategoryList(),
variation_category_list = cell.getVariationCategoryList(),
price = cell.getPrice(),
- base_quantity = cell.getQuantity(0.0),
quantity = cell.getQuantity(0.0),
**common_params
)
@@ -233,7 +231,6 @@
tmp_movement = newTempSimulationMovement(self.getPortalObject(),
self_id,
quantity = self.getQuantity(0.0),
- base_quantity = self.getQuantity(0.0),
price = self.getPrice(),
**common_params
)
@@ -258,17 +255,10 @@
# at least one base application is in base contributions and
# if the movement have no variation category, it's the same as
# if he have all variation categories
- original_quantity = tmp_movement.getQuantity(0.0)
- total_price = movement.getTotalPrice()
- base_quantity = original_quantity + total_price
- quantity = original_quantity + total_price * self.getEfficiency()
+ quantity = tmp_movement.getQuantity(0.0)
modified = 1
- rounding_method = self.getRoundingMethod()
- if rounding_method:
- roundQuantity = getattr(self, 'TradeModelLine_roundQuantity', None)
- if roundQuantity is not None:
- quantity = roundQuantity(context, quantity, rounding_method)
- tmp_movement.edit(base_quantity=base_quantity, quantity=quantity)
+ tmp_movement.setQuantity(quantity + movement.getTotalPrice())
+
else:
# if the quantity is defined, use it
modified = 1
Modified: erp5/trunk/products/ERP5/PropertySheet/TradeModelLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/PropertySheet/TradeModelLine.py?rev=30021&r1=30020&r2=30021&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/PropertySheet/TradeModelLine.py [utf8] (original)
+++ erp5/trunk/products/ERP5/PropertySheet/TradeModelLine.py [utf8] Tue Oct 27 09:13:55 2009
@@ -48,5 +48,5 @@
)
_categories = (
- 'base_application', 'base_contribution', 'trade_phase', 'rounding_method',
+ 'base_application', 'base_contribution', 'trade_phase',
)
More information about the Erp5-report
mailing list