From 9163fa2a6c5431483c9c49d7c8766be4263798fc Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Fri, 18 Feb 2005 15:03:10 +0000 Subject: [PATCH] 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 --- product/ERP5Type/ERP5Type.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/product/ERP5Type/ERP5Type.py b/product/ERP5Type/ERP5Type.py index 1d8d181d17..30f5749b4e 100755 --- a/product/ERP5Type/ERP5Type.py +++ b/product/ERP5Type/ERP5Type.py @@ -57,6 +57,11 @@ class ERP5TypeInformation( FactoryTypeInformation ): 'label':'Init Script'}, {'id':'filter_content_types', 'type': 'boolean', 'mode':'w', 'label':'Filter content types?'}, + {'id':'hide_from_add_menu' + , 'type': 'boolean' + , 'mode':'w' + , 'label':'Hide From Had Menu' + }, {'id':'allowed_content_types' , 'type': 'multiple selection' , 'mode':'w' @@ -82,6 +87,7 @@ class ERP5TypeInformation( FactoryTypeInformation ): init_script = '' product = 'ERP5Type' immediate_view = 'view' + hide_from_add_menu = False # # Acquisition editing interface @@ -89,6 +95,14 @@ class ERP5TypeInformation( FactoryTypeInformation ): _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 -- 2.30.9