Commit bc6a2921 authored by Nicolas Delaby's avatar Nicolas Delaby

getPortalEntityTypeList is already a reality for CRM features.

Make it explicit and configurable


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43728 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b61efec1
...@@ -44,6 +44,8 @@ portal_variation_type_list = ('Variation', 'Variante Tissu', 'Variante Modele', ...@@ -44,6 +44,8 @@ portal_variation_type_list = ('Variation', 'Variante Tissu', 'Variante Modele',
portal_node_type_list = ('Organisation','Person','Category','MetaNode', portal_node_type_list = ('Organisation','Person','Category','MetaNode',
'Account') 'Account')
portal_entity_type_list = ('Organisation', 'Person',)
portal_payment_node_type_list = ('Bank Account', 'Credit Card', ) portal_payment_node_type_list = ('Bank Account', 'Credit Card', )
portal_invoice_type_list = ('Invoice', 'Sale Invoice', 'Sales Invoice', 'Sale Invoice Transaction', portal_invoice_type_list = ('Invoice', 'Sale Invoice', 'Sales Invoice', 'Sale Invoice Transaction',
......
...@@ -1283,6 +1283,15 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin): ...@@ -1283,6 +1283,15 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
""" """
return self._getPortalGroupedTypeList('movement_group') return self._getPortalGroupedTypeList('movement_group')
security.declareProtected(Permissions.AccessContentsInformation,
'getPortalEntityTypeList')
def getPortalEntityTypeList(self):
"""
Returns Entity types.
"""
return self._getPortalGroupedTypeList('entity') or\
self._getPortalConfiguration('portal_entity_type_list')
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getDefaultModuleId') 'getDefaultModuleId')
def getDefaultModuleId(self, portal_type, default=MARKER): def getDefaultModuleId(self, portal_type, default=MARKER):
......
...@@ -281,6 +281,8 @@ class ERP5TypeInformation(XMLObject, ...@@ -281,6 +281,8 @@ class ERP5TypeInformation(XMLObject,
'budget_variation', 'budget_variation',
# Module # Module
'module', 'module',
# Base
'entity',
# LEGACY - needs a warning - XXX-JPS # LEGACY - needs a warning - XXX-JPS
'tax_movement', 'tax_movement',
) )
......
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