diff --git a/product/ERP5/Document/Resource.py b/product/ERP5/Document/Resource.py index 4cb6f035be88af819f6f110376d7ecb5eb4411dd..612cbc61796871c4bd5f259dd81afc362b5173c6 100644 --- a/product/ERP5/Document/Resource.py +++ b/product/ERP5/Document/Resource.py @@ -660,7 +660,8 @@ class Resource(XMLMatrix, Variated): security.declareProtected(Permissions.AccessContentsInformation, 'getPriceParameterDict') - def getPriceParameterDict(self, context=None, REQUEST=None, **kw): + def getPriceParameterDict(self, context=None, REQUEST=None, + supply_path_type=None, **kw): """ Get all pricing parameters from Predicate. """ @@ -679,7 +680,12 @@ class Resource(XMLMatrix, Variated): # Generate the predicate mapped value # to get some price values. domain_tool = getToolByName(self,'portal_domains') - portal_type_list = self.getPortalSupplyPathTypeList() + if supply_path_type is None: + portal_type_list = self.getPortalSupplyPathTypeList() + elif isinstance(supply_path_type, (list, tuple)): + portal_type_list = supply_path_type + else: + portal_type_list = (supply_path_type,) # Generate the fake context tmp_context = self.asContext(context=context,