Commit c62e0a16 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Added objectCount() method.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1780 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5a9ddd60
...@@ -1296,6 +1296,13 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1296,6 +1296,13 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
portal_workflow = self.portal_workflow portal_workflow = self.portal_workflow
return portal_workflow.getInfoFor(self, name, wf_id=wf_id) 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) # Hide Acquisition to prevent loops (ex. in cells)
# Another approach is to use XMLObject everywhere # Another approach is to use XMLObject everywhere
# DIRTY TRICK XXX # DIRTY TRICK XXX
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment