[Erp5-report] r35597 yo - /erp5/trunk/products/ERP5/Document/Movement.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue May 25 06:57:46 CEST 2010
Author: yo
Date: Tue May 25 06:57:44 2010
New Revision: 35597
URL: http://svn.erp5.org?rev=35597&view=rev
Log:
Override _getBaseUnitPrice, as we want to use Movement.getPriceCalculationOperandDict if the context is a Movement.
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=35597&r1=35596&r2=35597&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Movement.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Movement.py [utf8] Tue May 25 06:57:44 2010
@@ -225,6 +225,14 @@
else:
return default
+ def _getBaseUnitPrice(self, context):
+ # Override Amount._getBaseUnitPrice to use Movement's
+ # getPriceCalculationOperandDict instead of Resource's.
+ operand_dict = context.getPriceParameterDict(context=context)
+ if operand_dict is not None:
+ base_unit_price = operand_dict.get('base_unit_price', None)
+ return base_unit_price
+
security.declareProtected(Permissions.AccessContentsInformation,
'getPriceCalculationOperandDict')
def getPriceCalculationOperandDict(self, default=None, context=None, **kw):
More information about the Erp5-report
mailing list