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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hugo Ricateau
erp5
Commits
fd77927d
Commit
fd77927d
authored
Dec 28, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CommitTool: Update installation of commit
parent
14f43740
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
product/ERP5/Document/BusinessCommit.py
product/ERP5/Document/BusinessCommit.py
+18
-2
No files found.
product/ERP5/Document/BusinessCommit.py
View file @
fd77927d
...
...
@@ -141,10 +141,26 @@ class BusinessCommit(Folder):
def
install
(
self
):
"""
Installation:
- check if there is already an equivalent snapshot
- if not, create one and install it
- Check if the status is committed (Done by constraint of Business Commit
portal_type)
- Check if there are installed Business Manager(s) because they will be
required in building new Business Snapshot. Raise if there are None.
- Create an equivalent snapshot (using items of this commit and predecessors
belonging to installed Business Managers)
- TODO: Compare the snapshot with the last snapshot
- Install the snapshot
"""
site
=
self
.
getPortalObject
()
portal_templates
=
site
.
portal_templates
installed_bm_list
=
portal_templates
.
getInstalledBusinessManagerList
()
# Should raise if there is no installed BM in ZODB. Should install BM via
# portal_templates first.
# XXX: Maybe instead of raising, we can provide an option to install BM
# here only. So that a new user don't get confused ?
if
not
installed_bm_list
:
raise
ValueError
(
'There is no installed BM to create snapshot'
)
successor_list
=
self
.
getPredecessorRelatedValueList
()
# Check if the successor list has a snapshot in it
...
...
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