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
amrani
erp5
Commits
8ddaf72f
Commit
8ddaf72f
authored
Mar 31, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Only add property values after removing the old value
parent
ca9709c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+5
-3
product/ERP5/Tool/TemplateTool.py
product/ERP5/Tool/TemplateTool.py
+6
-2
No files found.
product/ERP5/Document/BusinessManager.py
View file @
8ddaf72f
...
...
@@ -798,9 +798,11 @@ class BusinessItem(Implicit, Persistent):
self
.
isProperty
=
True
relative_url
,
property_id
=
self
.
_path
.
split
(
'#'
)
obj
=
portal
.
unrestrictedTraverse
(
relative_url
)
# XXX: Here, we do deal with different cases such as if the object exists
# or not or have the same value or compare states
prop
=
self
.
_value
# First remove the property from the existing path and keep the default
# empty, and update only if the sign is +1
obj
.
_delPropValue
(
prop
[
'name'
])
if
self
.
_sign
==
1
:
obj
.
setProperty
(
prop
[
'name'
],
prop
[
'value'
],
prop
[
'type'
])
else
:
path_list
=
self
.
_path
.
split
(
'/'
)
...
...
product/ERP5/Tool/TemplateTool.py
View file @
8ddaf72f
...
...
@@ -1842,7 +1842,11 @@ class TemplateTool (BaseTool):
# Compare new item hash with ZODB
if
new_item
.
_sha
==
obj_sha
:
# If same hash, do nothing
if
new_item
.
_sign
==
-
1
:
# If the sign is negative, remove the value from the path
new_item
.
install
(
installation_process
)
else
:
# If same hash, and +1 sign, do nothing
continue
else
:
...
...
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