Commit dc0cd51b authored by Jérome Perrin's avatar Jérome Perrin

encode the unicode string return by getTranslatedPortalType to UTF8


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4408 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 985cd3be
...@@ -1571,14 +1571,15 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1571,14 +1571,15 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
""" """
return self.portal_type return self.portal_type
security.declareProtected(Permissions.AccessContentsInformation, 'getPortalType') security.declareProtected(Permissions.AccessContentsInformation,
'getTranslatedPortalType')
def getTranslatedPortalType(self): def getTranslatedPortalType(self):
""" """
This returns the translated portal_type This returns the translated portal_type
""" """
portal_type = self.portal_type portal_type = self.portal_type
translation_service = getToolByName(self, 'translation_service') translation_service = getToolByName(self, 'translation_service')
return translation_service.translate('ui', portal_type) return translation_service.translate('ui', portal_type).encode('utf8')
security.declareProtected(Permissions.ModifyPortalContent, 'setPortalType') security.declareProtected(Permissions.ModifyPortalContent, 'setPortalType')
def setPortalType(self, portal_type = None): def setPortalType(self, portal_type = None):
......
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