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
cea34996
Commit
cea34996
authored
Sep 19, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Introduce BusinessPatchItem
parent
16ddf1cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+42
-0
No files found.
product/ERP5/Document/BusinessManager.py
View file @
cea34996
...
...
@@ -1109,6 +1109,48 @@ class BusinessPropertyItem(XMLObject):
def
getBusinessItemPropertyValue
(
self
):
return
self
.
getProperty
(
'item_property_value'
)
class
BusinesTemplatePatchItem
(
XMLObject
):
"""
Business Item for saving patch and diff. This will help us to create a diff or
patch between the old value and current value.
item_sign -- +1 or -1
item_path -- extended OFS path (equivalent to deepdiff path)
ex. a/b/c#x/y/z:int/w
item_layer -- layer
old -- old value
new -- new value
dependency_list -- a list of bt5 identifiers useful to rebuild the BusinesTemplatePatchItem instance
preserved_list -- a list of bt5 identifiers useful to rebuild the BusinesTemplatePatchItem instance
"""
add_permission
=
Permissions
.
AddPortalContent
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
portal_type
=
'Business Patch item'
meta_type
=
'Business Patch Item'
icon
=
None
isIndexable
=
False
isProperty
=
False
def
__init__
(
self
,
item_path
,
item_sign
,
item_layer
,
old
,
new
,
dependency_list
,
preserved_list
=
None
):
pass
def
getOldValue
(
self
):
"""
Returns old value from the old BM
"""
pass
def
getNewValue
(
self
):
"""
Returns new value from the new BM
"""
pass
def
registerSkinFolder
(
skin_tool
,
skin_folder
):
request
=
skin_tool
.
REQUEST
# XXX: Getting parameter from request instead of dialog is bad
...
...
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