Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
francois
erp5
Commits
5a85bc7c
Commit
5a85bc7c
authored
Nov 06, 2014
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a new ID generator that uses node-id defined in zope.conf
parent
05509c11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
product/ERP5Type/Core/Folder.py
product/ERP5Type/Core/Folder.py
+10
-0
No files found.
product/ERP5Type/Core/Folder.py
View file @
5a85bc7c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment