Commit 9163fa2a authored by Sebastien Robin's avatar Sebastien Robin

do not display some portal type in the add menu of the user, for example we do...

do not display some portal type in the add menu of the user, for example we do not want to dispaly cells


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2505 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 02981beb
...@@ -57,6 +57,11 @@ class ERP5TypeInformation( FactoryTypeInformation ): ...@@ -57,6 +57,11 @@ class ERP5TypeInformation( FactoryTypeInformation ):
'label':'Init Script'}, 'label':'Init Script'},
{'id':'filter_content_types', 'type': 'boolean', 'mode':'w', {'id':'filter_content_types', 'type': 'boolean', 'mode':'w',
'label':'Filter content types?'}, 'label':'Filter content types?'},
{'id':'hide_from_add_menu'
, 'type': 'boolean'
, 'mode':'w'
, 'label':'Hide From Had Menu'
},
{'id':'allowed_content_types' {'id':'allowed_content_types'
, 'type': 'multiple selection' , 'type': 'multiple selection'
, 'mode':'w' , 'mode':'w'
...@@ -82,6 +87,7 @@ class ERP5TypeInformation( FactoryTypeInformation ): ...@@ -82,6 +87,7 @@ class ERP5TypeInformation( FactoryTypeInformation ):
init_script = '' init_script = ''
product = 'ERP5Type' product = 'ERP5Type'
immediate_view = 'view' immediate_view = 'view'
hide_from_add_menu = False
# #
# Acquisition editing interface # Acquisition editing interface
...@@ -89,6 +95,14 @@ class ERP5TypeInformation( FactoryTypeInformation ): ...@@ -89,6 +95,14 @@ class ERP5TypeInformation( FactoryTypeInformation ):
_actions_form = DTMLFile( 'editToolsActions', _dtmldir ) _actions_form = DTMLFile( 'editToolsActions', _dtmldir )
security.declarePublic('hideFromAddMenu')
def hideFromAddMenu(self):
"""
Return only true or false if we should
hide from add menu
"""
return self.hide_from_add_menu
# #
# Agent methods # Agent methods
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment