[Erp5-report] r26755 - /erp5/trunk/products/ERP5/Document/TradeModelRule.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 30 17:47:53 CEST 2009


Author: luke
Date: Thu Apr 30 17:47:51 2009
New Revision: 26755

URL: http://svn.erp5.org?rev=26755&view=rev
Log:
 - use common implementation to find trade condition and business process

Modified:
    erp5/trunk/products/ERP5/Document/TradeModelRule.py

Modified: erp5/trunk/products/ERP5/Document/TradeModelRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TradeModelRule.py?rev=26755&r1=26754&r2=26755&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeModelRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeModelRule.py [utf8] Thu Apr 30 17:47:51 2009
@@ -60,17 +60,6 @@
                     , PropertySheet.AppliedRule
                     )
 
-  def getSpecialiseList(self, simulation_movement):
-    """Returns (trade_condition, bpm)"""
-    bpm = simulation_movement.getRootAppliedRule().getBusinessProcessValue()
-    causality = simulation_movement.getRootAppliedRule().getCausalityValue()
-    trade_condition = None
-    if causality is not None and getattr(causality, 'getSpecialiseValueList',
-        None) is not None:
-      trade_condition = causality.getSpecialiseValue()
-
-    return trade_condition, bpm
-
   def _getMovementDictByBusinessPath(self, movement, business_path_list):
     """Sets Business Path's provided values"""
     if len(business_path_list) > 1:
@@ -121,7 +110,8 @@
     """Generates list of movements (as dicts), and let parent class to decide
     which is to add, modify or delete"""
     movement_list = []
-    trade_condition, bpm = self.getSpecialiseList(applied_rule)
+    trade_condition = applied_rule.getTradeConditionValue()
+    bpm = applied_rule.getBusinessProcessValue()
 
     if trade_condition is None or bpm is None:
       return movement_list




More information about the Erp5-report mailing list