[Erp5-report] r32993 kazuhiko - /erp5/trunk/products/ERP5/Document/PaymentSimulationRule.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Feb 23 08:08:59 CET 2010
Author: kazuhiko
Date: Tue Feb 23 08:08:58 2010
New Revision: 32993
URL: http://svn.erp5.org?rev=32993&view=rev
Log:
try to find payment conditions in the following order.
* local payment conditions
* payment conditions specified in specialised trade conditions
* payment conditions specified in BPM configuration
Modified:
erp5/trunk/products/ERP5/Document/PaymentSimulationRule.py
Modified: erp5/trunk/products/ERP5/Document/PaymentSimulationRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PaymentSimulationRule.py?rev=32993&r1=32992&r2=32993&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PaymentSimulationRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/PaymentSimulationRule.py [utf8] Tue Feb 23 08:08:58 2010
@@ -63,7 +63,27 @@
movement_and_tuple_list = self._getInputMovementAndPathTupleList(
applied_rule)
input_movement = movement_and_tuple_list[0][0]
- payment_condition_list = [x[1] for x in movement_and_tuple_list if x[1] is not None]
+
+ payment_conditon_list = []
+
+ # try to find local payment conditions
+ delivery = input_movement.getDeliveryValue()
+ if delivery is None:
+ delivery = input_movement.getExplanationValue()
+ if delivery is not None:
+ payment_condition_list = delivery.getPaymentConditionValueList()
+
+ # try to find payment conditions in specialised trade conditions
+ if len(payment_condition_list) == 0:
+ specialise = input_movement.getSpecialiseValue()
+ if specialise is None and delivery is not None:
+ specialise = delivery.getSpecialiseValue()
+ if specialise is not None:
+ payment_condition_list = specialise.getPaymentConditionValueList()
+
+ # try to use payment conditions in BPM configuration
+ if len(payment_condition_list) == 0:
+ payment_condition_list = [x[1] for x in movement_and_tuple_list if x[1] is not None]
kw = self._getExpandablePropertyDict(applied_rule, input_movement, None)
prevision_list = []
More information about the Erp5-report
mailing list