diff --git a/product/ERP5/ExplanationCache.py b/product/ERP5/ExplanationCache.py index 4e1419e08935c9f7db23b2ceacb6d8b02b078b0f..1a6352b6a8f0667deff9fea165a7ad6864a67292 100644 --- a/product/ERP5/ExplanationCache.py +++ b/product/ERP5/ExplanationCache.py @@ -30,7 +30,7 @@ from zLOG import LOG from Products.CMFCore.utils import getToolByName from Products.ERP5Type.Cache import transactional_cached - +from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod class ExplanationCache: """ExplanationCache provides a central access to @@ -162,6 +162,7 @@ class ExplanationCache: #XXXXXXXXXXX BAD return self.getSimulationMovementValueList(causality_uid=business_link.getUid()) + @UnrestrictedMethod def getSimulationMovementValueList(self, **kw): """Search Simulation Movements related to our explanation. Cache result so that the second time we saarch for the same @@ -216,7 +217,7 @@ class ExplanationCache: catalog_kw['trade_phase_relative_url'] = catalog_kw['trade_phase'] del catalog_kw['trade_phase'] self.simulation_movement_cache[kw_tuple] = \ - self.portal_catalog.unrestrictedSearchResults(portal_type="Simulation Movement", + self.portal_catalog(portal_type="Simulation Movement", **catalog_kw) return self.simulation_movement_cache[kw_tuple] @@ -229,7 +230,7 @@ class ExplanationCache: simulation_movement_list = self.getSimulationMovementValueList() simulation_movement_uid_list = map(lambda x:x.uid, simulation_movement_list) # We could use related keys instead of 2 queries - business_link_list = self.portal_catalog.unrestrictedSearchResults( + business_link_list = self.portal_catalog( portal_type=business_type_list, causality_related_uid=simulation_movement_uid_list, **kw)