Commit 09fec26d authored by Jérome Perrin's avatar Jérome Perrin

ERP5Type/Base: fix getTranslatedPortalType return type on python3

parent e83c9860
...@@ -2605,7 +2605,10 @@ class Base( ...@@ -2605,7 +2605,10 @@ class Base(
This returns the translated portal_type This returns the translated portal_type
""" """
localizer = self.getPortalObject().Localizer 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') security.declareProtected(Permissions.AccessContentsInformation, 'getMetaType')
def getMetaType(self): 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