[Erp5-report] r15376 - /erp5/trunk/products/ERP5/Document/Movement.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jul 30 01:08:17 CEST 2007


Author: yo
Date: Mon Jul 30 01:08:16 2007
New Revision: 15376

URL: http://svn.erp5.org?rev=15376&view=rev
Log:
Explicitly try to get Movement_getPriceCalculationOperandDict, because Movement is used as a base class.

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

Modified: erp5/trunk/products/ERP5/Document/Movement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Movement.py?rev=15376&r1=15375&r2=15376&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Movement.py (original)
+++ erp5/trunk/products/ERP5/Document/Movement.py Mon Jul 30 01:08:16 2007
@@ -232,6 +232,11 @@
     if context is None:
       context = self
     method = context._getTypeBasedMethod('getPriceCalculationOperandDict')
+    if method is None:
+      # Try this, because when the context is an instance of a derived
+      # class of Movement, Movement_getPriceCalculationOperandDict is
+      # not searched.
+      method = getattr(context, 'Movement_getPriceCalculationOperandDict', None)
     if method is not None:
       operand_dict = method(**kw)
       if operand_dict is None:




More information about the Erp5-report mailing list