Commit 9b927d28 authored by Jérome Perrin's avatar Jérome Perrin Committed by Kazuhiko Shiozaki

ERP5Type/Base: fix getTranslatedPortalType return type on python3

parent e195232a
......@@ -2605,7 +2605,10 @@ class Base(
This returns the translated portal_type
"""
localizer = self.getPortalObject().Localizer
return localizer.erp5_ui.gettext(self.portal_type).encode('utf8')
translated_portal_type = localizer.erp5_ui.gettext(self.portal_type)
if six.PY2:
translated_portal_type = translated_portal_type.encode('utf8')
return translated_portal_type
security.declareProtected(Permissions.AccessContentsInformation, 'getMetaType')
def getMetaType(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