Commit 8efdfbdf authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add group_list.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4394 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7a7d876b
...@@ -114,6 +114,12 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ): ...@@ -114,6 +114,12 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ):
, 'label':'Base Categories' , 'label':'Base Categories'
, 'select_variable':'getBaseCategoryList' , 'select_variable':'getBaseCategoryList'
}, },
{'id':'group_list'
, 'type': 'multiple selection'
, 'mode':'w'
, 'label':'Groups'
, 'select_variable':'getGroupList'
},
)) ))
acquire_local_roles = True acquire_local_roles = True
...@@ -126,6 +132,16 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ): ...@@ -126,6 +132,16 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ):
filter_actions = 0 filter_actions = 0
allowed_action_list = [] allowed_action_list = []
# Groups are used to classify portal types (e.g. resource).
defined_group_list = (
'accounting_movement', 'alarm', 'balance_transaction_line',
'container', 'container_line', 'delivery', 'delivery_movement',
'discount', 'invoice', 'invoice_movement', 'item',
'order', 'order_movement', 'node', 'payment_condition',
'resource', 'supply', 'transformation', 'variation',
)
group_list = ()
# #
# Acquisition editing interface # Acquisition editing interface
# #
...@@ -213,6 +229,10 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ): ...@@ -213,6 +229,10 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ):
result.sort() result.sort()
return result return result
security.declareProtected(ERP5Permissions.AccessContentsInformation, 'getGroupList')
def getGroupList( self ):
return self.defined_group_list
security.declareProtected(ERP5Permissions.ModifyPortalContent, 'assignRoleToSecurityGroup') security.declareProtected(ERP5Permissions.ModifyPortalContent, 'assignRoleToSecurityGroup')
def assignRoleToSecurityGroup(self, object): def assignRoleToSecurityGroup(self, object):
""" """
...@@ -383,7 +403,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ): ...@@ -383,7 +403,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ):
if previous_property_sheet_list != self.property_sheet_list or \ if previous_property_sheet_list != self.property_sheet_list or \
base_category_list != self.base_category_list: base_category_list != self.base_category_list:
from Products.ERP5Type.Base import _aq_reset from Products.ERP5Type.Base import _aq_reset
_aq_reset() # XXX We should also call it whenever we change workflow defitino _aq_reset() # XXX We should also call it whenever we change workflow defition
return result return result
security.declareProtected( ERP5Permissions.ManagePortal, 'manage_editLocalRolesForm' ) security.declareProtected( ERP5Permissions.ManagePortal, 'manage_editLocalRolesForm' )
......
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