diff --git a/product/ERP5/ERP5Site.py b/product/ERP5/ERP5Site.py index 6b4d60e3a83d72c6a1fae8c555d699c1e789a1ea..24be9fb76966b6b781285d3f5ce8d0865830ca54 100644 --- a/product/ERP5/ERP5Site.py +++ b/product/ERP5/ERP5Site.py @@ -427,11 +427,7 @@ class ERP5Site(FolderMixIn, CMFSite): if group in getattr(pt, 'group_list', ()): type_list.append(pt.getId()) - def sortByTranslation(a, b): - return cmp(localizer_tool.translate('ui', a), - localizer_tool.translate('ui', b)) - - type_list.sort(sortByTranslation) + type_list.sort(key=lambda x:localizer_tool.translate('ui', x)) return tuple(type_list) localizer_tool = getToolByName(self, 'Localizer')