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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
preetwinder
erp5
Commits
62b3c370
Commit
62b3c370
authored
Mar 31, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_catalog: Explicilty add tab and remove useless constructors
parent
ad4712c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
30 deletions
+11
-30
product/ERP5Catalog/Document/ERP5Catalog.py
product/ERP5Catalog/Document/ERP5Catalog.py
+11
-30
No files found.
product/ERP5Catalog/Document/ERP5Catalog.py
View file @
62b3c370
...
@@ -44,25 +44,6 @@ from zLOG import LOG, INFO, TRACE, WARNING, ERROR
...
@@ -44,25 +44,6 @@ from zLOG import LOG, INFO, TRACE, WARNING, ERROR
import
time
import
time
import
urllib
import
urllib
def
manage_addERP5Catalog
(
self
,
id
,
title
,
vocab_id
=
'create_default_catalog_'
,
REQUEST
=
None
,
**
kw
):
"""Add a Catalog object
"""
id
=
str
(
id
)
title
=
str
(
title
)
vocab_id
=
str
(
vocab_id
)
if
vocab_id
==
'create_default_catalog_'
:
vocab_id
=
None
c
=
ERP5Catalog
(
id
,
title
,
self
)
self
.
_setObject
(
id
,
c
)
c
=
self
.
_getOb
(
id
)
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
redirect
(
'manage_main'
)
return
c
class
Filter
(
object
):
class
Filter
(
object
):
"""
"""
Class to act as filter object for filterable methods.
Class to act as filter object for filterable methods.
...
@@ -166,14 +147,17 @@ class ERP5Catalog(Folder, Catalog):
...
@@ -166,14 +147,17 @@ class ERP5Catalog(Folder, Catalog):
# Declarative security
# Declarative security
security
=
ClassSecurityInfo
()
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'manage_editProperties'
,
# Explicitly add tabs for manage_options
'manage_changeProperties'
,
manage_options
=
({
'label'
:
'View'
,
'action'
:
'view'
},
'manage_propertiesForm'
,
{
'label'
:
'Contents'
,
'action'
:
'manage_main'
},
)
{
'label'
:
'Security'
,
'action'
:
'manage_access'
},
{
'label'
:
'Undo'
,
'action'
:
'manage_UndoForm'
},
manage_options
=
(
Folder
.
manage_options
+
{
'label'
:
'Ownership'
,
'action'
:
'manage_owner'
},
OFS
.
History
.
Historical
.
manage_options
{
'label'
:
'Interfaces'
,
'action'
:
'manage_interfaces'
},
{
'label'
:
'Find'
,
'action'
:
'manage_findForm'
},
{
'label'
:
'History'
,
'action'
:
'manage_change_history_page'
},
{
'label'
:
'Workflows'
,
'action'
:
'manage_workflowsTab'
},
)
)
# Declarative properties
# Declarative properties
...
@@ -184,9 +168,6 @@ class ERP5Catalog(Folder, Catalog):
...
@@ -184,9 +168,6 @@ class ERP5Catalog(Folder, Catalog):
,
PropertySheet
.
Catalog
,
PropertySheet
.
Catalog
)
)
# Declarative Constructors
constructors
=
(
manage_addERP5Catalog
,)
# Use functions inherited from SQLCatalog for property setters
# Use functions inherited from SQLCatalog for property setters
_setPropValue
=
Catalog
.
_setPropValue
_setPropValue
=
Catalog
.
_setPropValue
getProperty
=
Folder
.
getProperty
getProperty
=
Folder
.
getProperty
...
...
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