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
a8d7e9a1
Commit
a8d7e9a1
authored
May 04, 2017
by
Ayush Tiwari
Committed by
Ayush Tiwari
Nov 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_package: Add constructors to classes need for intialization
parent
017ab891
Changes
2
Hide 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 @
a8d7e9a1
...
@@ -140,6 +140,22 @@ def _recursiveRemoveUid(obj):
...
@@ -140,6 +140,22 @@ def _recursiveRemoveUid(obj):
_recursiveRemoveUid
(
subobj
)
_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
):
class
BusinessManager
(
Folder
):
"""Business Manager is responsible for saving objects and properties in
"""Business Manager is responsible for saving objects and properties in
...
@@ -597,9 +613,10 @@ class BusinessItem(XMLObject):
...
@@ -597,9 +613,10 @@ class BusinessItem(XMLObject):
# Declarative security
# Declarative security
security
=
ClassSecurityInfo
()
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
constructors
=
(
manage_addBusinessItem
,)
portal_type
=
'Business Item'
portal_type
=
'Business Item'
meta_type
=
'Business Item'
meta_type
=
'Business Item'
icon
=
None
isProperty
=
False
isProperty
=
False
isIndexable
=
False
isIndexable
=
False
...
@@ -902,8 +919,10 @@ class BusinessPropertyItem(XMLObject):
...
@@ -902,8 +919,10 @@ class BusinessPropertyItem(XMLObject):
portal_type
=
'Business Property Item'
portal_type
=
'Business Property Item'
meta_type
=
'Business Property Item'
meta_type
=
'Business Property Item'
icon
=
None
isIndexable
=
False
isIndexable
=
False
isProperty
=
True
isProperty
=
True
constructors
=
(
manage_addBusinessPropertyItem
,)
def
_edit
(
self
,
item_path
=
''
,
item_sign
=
1
,
item_layer
=
0
,
*
args
,
**
kw
):
def
_edit
(
self
,
item_path
=
''
,
item_sign
=
1
,
item_layer
=
0
,
*
args
,
**
kw
):
"""
"""
...
...
product/ERP5/__init__.py
View file @
a8d7e9a1
...
@@ -58,6 +58,7 @@ object_classes = ( ERP5Site.ERP5Site,
...
@@ -58,6 +58,7 @@ object_classes = ( ERP5Site.ERP5Site,
PythonScript
.
PythonScriptThroughZMI
,
PythonScript
.
PythonScriptThroughZMI
,
SQLMethod
.
SQLMethod
,
SQLMethod
.
SQLMethod
,
BusinessManager
.
BusinessItem
,
BusinessManager
.
BusinessItem
,
BusinessManager
.
BusinessPropertyItem
,
)
)
portal_tools
=
(
CategoryTool
.
CategoryTool
,
portal_tools
=
(
CategoryTool
.
CategoryTool
,
SimulationTool
.
SimulationTool
,
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