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
Bryan Kaperick
erp5
Commits
84cea92a
Commit
84cea92a
authored
May 04, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_package: Add constructors to classes need for intialization
parent
d6ffba49
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+20
-1
product/ERP5/__init__.py
product/ERP5/__init__.py
+1
-0
No files found.
product/ERP5/Document/BusinessManager.py
View file @
84cea92a
...
...
@@ -140,6 +140,22 @@ def _recursiveRemoveUid(obj):
_recursiveRemoveUid
(
subobj
)
# New BusinessItem addition function
def
manage_addBusinessItem
(
self
,
item_path
=
''
,
item_sign
=
1
,
item_layer
=
0
,
*
args
,
**
kw
):
# Create BusinessItem object container
c
=
BusinessItem
(
item_path
,
item_sign
,
item_layer
)
return
c
# New BusinessPropertyItem addition function
def
manage_addBusinessPropertyItem
(
self
,
item_path
=
''
,
item_sign
=
1
,
item_layer
=
0
,
*
args
,
**
kw
):
# Create BusinessPathItem object container
c
=
BusinessPropertyItem
(
item_path
,
item_sign
,
item_layer
)
return
c
class
BusinessManager
(
Folder
):
"""Business Manager is responsible for saving objects and properties in
...
...
@@ -597,9 +613,10 @@ class BusinessItem(XMLObject):
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
constructors
=
(
manage_addBusinessItem
,)
portal_type
=
'Business Item'
meta_type
=
'Business Item'
icon
=
None
isProperty
=
False
isIndexable
=
False
...
...
@@ -902,8 +919,10 @@ class BusinessPropertyItem(XMLObject):
portal_type
=
'Business Property Item'
meta_type
=
'Business Property Item'
icon
=
None
isIndexable
=
False
isProperty
=
True
constructors
=
(
manage_addBusinessPropertyItem
,)
def
_edit
(
self
,
item_path
=
''
,
item_sign
=
1
,
item_layer
=
0
,
*
args
,
**
kw
):
"""
...
...
product/ERP5/__init__.py
View file @
84cea92a
...
...
@@ -58,6 +58,7 @@ object_classes = ( ERP5Site.ERP5Site,
PythonScript
.
PythonScriptThroughZMI
,
SQLMethod
.
SQLMethod
,
BusinessManager
.
BusinessItem
,
BusinessManager
.
BusinessPropertyItem
,
)
portal_tools
=
(
CategoryTool
.
CategoryTool
,
SimulationTool
.
SimulationTool
,
...
...
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