diff --git a/product/ERP5/Document/Resource.py b/product/ERP5/Document/Resource.py index af97bfdc73e5cc3cee210f290fcbfb1413af5306..de9caf33cf5512df96fa3144f5f45549847dfe89 100755 --- a/product/ERP5/Document/Resource.py +++ b/product/ERP5/Document/Resource.py @@ -469,25 +469,25 @@ class Resource(XMLMatrix, CoreResource, Variated): # Industrial price API -# security.declareProtected(Permissions.AccessContentsInformation, 'getIndustrialPrice') -# def getIndustrialPrice(self, context=None, REQUEST=None, **kw): -# """ -# Returns industrial price -# """ -# context = self.asContext(context=context, REQUEST=REQUEST, **kw) -# result = self._getIndustrialPrice(context) -# if result is None: -# self._updateIndustrialPrice(context) -# result = self._getIndustrialPrice(context) -# return result -# -# def _getIndustrialPrice(self, context): -# # Default value is None -# return None -# -# def _updateIndustrialPrice(self, context): -# # Do nothing by default -# pass + security.declareProtected(Permissions.AccessContentsInformation, 'getIndustrialPrice') + def getIndustrialPrice(self, context=None, REQUEST=None, **kw): + """ + Returns industrial price + """ + context = self.asContext(context=context, REQUEST=REQUEST, **kw) + result = self._getIndustrialPrice(context) + if result is None: + self._updateIndustrialPrice(context) + result = self._getIndustrialPrice(context) + return result + + def _getIndustrialPrice(self, context): + # Default value is None + return None + + def _updateIndustrialPrice(self, context): + # Do nothing by default + pass # Predicate handling security.declareProtected(Permissions.AccessContentsInformation,