Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
acae1518
Commit
acae1518
authored
Dec 06, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Generate UUID for id of Business Commit and Business Item
parent
3eaef7e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
product/ERP5/Document/BusinessCommit.py
product/ERP5/Document/BusinessCommit.py
+3
-5
product/ERP5/Tool/CommitTool.py
product/ERP5/Tool/CommitTool.py
+2
-2
No files found.
product/ERP5/Document/BusinessCommit.py
View file @
acae1518
...
...
@@ -39,6 +39,7 @@ import fnmatch
import
re
import
threading
import
pprint
import
uuid
from
copy
import
deepcopy
from
collections
import
defaultdict
...
...
@@ -115,9 +116,6 @@ class BusinessCommit(Folder):
Also, copy the objects in the Business Commit after creating new object
"""
if
id
is
None
:
id
=
self
.
generateNewId
()
id
=
uuid
.
uuid1
()
id
=
str
(
str
(
id
)
+
'_'
+
str
(
time
.
time
())).
replace
(
'.'
,
''
)
new_object
=
super
(
BusinessCommit
,
self
).
newContent
(
id
,
**
kw
)
return
new_object
return
super
(
BusinessCommit
,
self
).
newContent
(
id
,
**
kw
)
product/ERP5/Tool/CommitTool.py
View file @
acae1518
...
...
@@ -37,6 +37,7 @@ import sys
import
hashlib
import
pprint
import
transaction
import
uuid
from
Acquisition
import
Implicit
,
Explicit
from
AccessControl
import
ClassSecurityInfo
...
...
@@ -183,9 +184,8 @@ class CommitTool (BaseTool):
Override newContent so as to use 'id' generated like hash
"""
if
id
is
None
:
id
=
self
.
generateNewId
()
id
=
uuid
.
uuid1
()
id
=
str
(
str
(
id
)
+
'_'
+
str
(
time
.
time
())).
replace
(
'.'
,
''
)
new_obj
=
super
(
CommitTool
,
self
).
newContent
(
id
,
**
kw
)
# Add the last commit as its predecessor
...
...
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