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
d5130878
Commit
d5130878
authored
Sep 28, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Function to get Diff in BusinessPatchItem objects
parent
c4692bb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+24
-0
No files found.
product/ERP5/Document/BusinessManager.py
View file @
d5130878
...
@@ -1177,6 +1177,11 @@ class BusinessPatchItem(XMLObject):
...
@@ -1177,6 +1177,11 @@ class BusinessPatchItem(XMLObject):
item_layer
=
self
.
getProperty
(
'item_layer'
)
item_layer
=
self
.
getProperty
(
'item_layer'
)
item_sign
=
self
.
getProperty
(
'item_sign'
)
item_sign
=
self
.
getProperty
(
'item_sign'
)
# Remove old objects if it exists
old_id_list
=
[
l
for
l
in
self
.
objectIds
()]
if
old_id_list
:
self
.
manage_delObjects
(
ids
=
old_id_list
)
# Get the dependency Business Manager
# Get the dependency Business Manager
dependency_list
=
self
.
getProperty
(
'dependency_list'
)
dependency_list
=
self
.
getProperty
(
'dependency_list'
)
if
dependency_list
:
if
dependency_list
:
...
@@ -1241,6 +1246,25 @@ class BusinessPatchItem(XMLObject):
...
@@ -1241,6 +1246,25 @@ class BusinessPatchItem(XMLObject):
else
:
else
:
return
old_item
.
getProperty
(
'item_property_value'
)
return
old_item
.
getProperty
(
'item_property_value'
)
def
getDiff
(
self
):
"""
Use diff tool to find the diff between two values
XXX: For now we display the json format of the patched diff
"""
portal
=
self
.
getPortalObject
()
diff_tool
=
portal
.
portal_diff
patch_format
=
'deepdiff'
patch
=
diff_tool
.
diffPortalObject
(
old
=
self
.
_getOb
(
'old_item'
),
new
=
self
.
_getOb
(
'new_item'
),
patch_format
=
patch_format
)
if
patch_format
==
'deepdiff'
:
return
patch
.
asDeepDiffPatch
().
json
else
:
# For json-patch object
return
patch
.
asJSONPatch
().
to_string
()
def
registerSkinFolder
(
skin_tool
,
skin_folder
):
def
registerSkinFolder
(
skin_tool
,
skin_folder
):
request
=
skin_tool
.
REQUEST
request
=
skin_tool
.
REQUEST
# XXX: Getting parameter from request instead of dialog is bad
# 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