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
44601f0f
Commit
44601f0f
authored
Sep 14, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Add args to install method in BI and BPI
parent
1eb53b87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+23
-4
No files found.
product/ERP5/Document/BusinessManager.py
View file @
44601f0f
...
...
@@ -755,13 +755,22 @@ class BusinessItem(XMLObject):
relative_url_list
+
[
object_id
],
id_list
[
1
:]))
return
path_list
def
install
(
self
,
context
):
def
install
(
self
,
context
,
*
args
):
"""
Set the value to the defined path.
"""
# In case the path denotes property, we create separate object for
# ObjectTemplateItem and handle the installation there.
portal
=
context
.
getPortalObject
()
try
:
portal
=
context
.
getPortalObject
()
except
AttributeError
:
# This is a possibility during bootstrap where the context is not an
# erp5 object but a dynamic class
if
args
:
portal
=
args
[
0
]
else
:
raise
AttributeError
(
'No portal object found'
)
path
=
self
.
getProperty
(
'item_path'
)
path_list
=
path
.
split
(
'/'
)
container_path
=
path_list
[:
-
1
]
...
...
@@ -1009,8 +1018,18 @@ class BusinessPropertyItem(XMLObject):
self
.
setProperty
(
'item_property_type'
,
property_type
)
self
.
setProperty
(
'item_property_value'
,
property_value
)
def
install
(
self
,
context
):
portal
=
context
.
getPortalObject
()
def
install
(
self
,
context
,
*
args
):
# Get portal object
try
:
portal
=
context
.
getPortalObject
()
except
AttributeError
:
# This is a possibility during bootstrap where the context is not an
# erp5 object but a dynamic class
if
args
:
portal
=
args
[
0
]
else
:
raise
AttributeError
(
'No portal object found'
)
path
=
self
.
getProperty
(
'item_path'
)
relative_url
,
property_id
=
path
.
split
(
'#'
)
obj
=
portal
.
unrestrictedTraverse
(
relative_url
)
...
...
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