Commit 5a85bc7c authored by Aurel's avatar Aurel

add a new ID generator that uses node-id defined in zope.conf

parent 05509c11
......@@ -214,6 +214,16 @@ class FolderMixIn(ExtensionClass.Base):
self._setLastId(my_id) # Make sure no reindexing happens
return my_id
def _generatePerNodeId(self):
"""
Generate id base on node-id defined in zope.conf,
useful for import and mass creation
of objects inside a module using activities
We also append random id
"""
activity_tool = self.getPortalObject().portal_activities
return "%s-%s" %(activity_tool.getCurrentNode(), self._generateRandomId())
def _generatePerNodeNumberId(self):
"""
Generate id base on node number, useful for import and mass creation
......
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