Commit 155dba14 authored by Alexandre Boeglin's avatar Alexandre Boeglin

add getPortalProductTypeList and getPortalServiceTypeList methods, and default values

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19788 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fa37831a
......@@ -165,6 +165,10 @@ portal_item_type_list = ()
portal_discount_type_list = ()
portal_product_type_list = ('Product', 'Component')
portal_service_type_list = ('Service',)
portal_alarm_type_list = ('Supply Alarm Line','Alarm')
portal_payment_condition_type_list = ('Condition Paiement',)
......
......@@ -783,6 +783,24 @@ class ERP5Site(FolderMixIn, CMFSite):
return self._getPortalGroupedTypeList('discount') or \
self._getPortalConfiguration('portal_discount_type_list')
security.declareProtected(Permissions.AccessContentsInformation,
'getPortalProductTypeList')
def getPortalProductTypeList(self):
"""
Return physical goods types.
"""
return self._getPortalGroupedTypeList('product') or \
self._getPortalConfiguration('portal_product_type_list')
security.declareProtected(Permissions.AccessContentsInformation,
'getPortalServiceTypeList')
def getPortalServiceTypeList(self):
"""
Return immaterial services types.
"""
return self._getPortalGroupedTypeList('service') or \
self._getPortalConfiguration('portal_service_type_list')
security.declareProtected(Permissions.AccessContentsInformation,
'getPortalAlarmTypeList')
def getPortalAlarmTypeList(self):
......
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