[Erp5-report] r14898 - /erp5/trunk/products/ERP5/Document/Resource.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jun 20 17:11:43 CEST 2007
Author: yo
Date: Wed Jun 20 17:11:42 2007
New Revision: 14898
URL: http://svn.erp5.org?rev=14898&view=rev
Log:
No reason to make pricing methods to be private. So remove the underscore.
Modified:
erp5/trunk/products/ERP5/Document/Resource.py
Modified: erp5/trunk/products/ERP5/Document/Resource.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Resource.py?rev=14898&r1=14897&r2=14898&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Resource.py (original)
+++ erp5/trunk/products/ERP5/Document/Resource.py Wed Jun 20 17:11:42 2007
@@ -557,8 +557,8 @@
return 1 # a has no destination ans loses
security.declareProtected(Permissions.AccessContentsInformation,
- '_getPriceParameterDict')
- def _getPriceParameterDict(self, context=None, REQUEST=None, **kw):
+ 'getPriceParameterDict')
+ def getPriceParameterDict(self, context=None, REQUEST=None, **kw):
"""
Get all pricing parameters from Predicate.
"""
@@ -620,8 +620,8 @@
return price_parameter_dict
security.declareProtected(Permissions.AccessContentsInformation,
- '_getPricingVariable')
- def _getPricingVariable(self, context=None):
+ 'getPricingVariable')
+ def getPricingVariable(self, context=None):
"""
Return the value of the property used to calculate variable pricing
This basically calls a script like Product_getPricingVariable
@@ -652,7 +652,7 @@
context = default
default = None
- price_parameter_dict = self._getPriceParameterDict(
+ price_parameter_dict = self.getPriceParameterDict(
context=context, REQUEST=REQUEST, **kw)
# Calculate the unit price
unit_base_price = None
@@ -684,7 +684,7 @@
for additional_price in price_parameter_dict['additional_price']:
unit_base_price += additional_price
# Sum variable additional price
- variable_value = self._getPricingVariable(context=context)
+ variable_value = self.getPricingVariable(context=context)
for variable_additional_price in \
price_parameter_dict['variable_additional_price']:
unit_base_price += variable_additional_price * variable_value
@@ -727,6 +727,3 @@
except TypeError:
return 0
return 0
-
-
-
More information about the Erp5-report
mailing list