diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 839f302d0926fdc6c84c07f31c70cd18dbaf1afa..b278b19de7eda53074815c499ba21a42c752227a 100755 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -1296,6 +1296,13 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): portal_workflow = self.portal_workflow return portal_workflow.getInfoFor(self, name, wf_id=wf_id) + security.declareProtected(Permissions.ManagePortal, 'View') + def objectCount(self): + """ + Returns number of objects + """ + return len(self.objectIds()) + # Hide Acquisition to prevent loops (ex. in cells) # Another approach is to use XMLObject everywhere # DIRTY TRICK XXX