diff --git a/product/ERP5/Document/Document.py b/product/ERP5/Document/Document.py index e423cfa4061b4ee0103f6cbff14152385ad2396c..84f0a845214eb4b66622d22cd62d84edd3f83c26 100644 --- a/product/ERP5/Document/Document.py +++ b/product/ERP5/Document/Document.py @@ -639,7 +639,7 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedCo reference = self.getReference() if not reference: return - catalog = getToolByName(self.getPortalObject(), 'portal_catalog') + catalog = self.getPortalObject().portal_catalog res = catalog(reference=self.getReference(), sort_on=(('creation_date','ascending'),)) # XXX this should be security-unaware - delegate to script with proxy roles return res[0].getLanguage() # XXX what happens if it is empty?