diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index 31cd6e994a9a2dc32da5eb79e6551e2b4c174e83..b05fc4a4e4638cd2261c00666cbd83a8eb035d2c 100644
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -1901,7 +1901,7 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem):
     keys = dictio.keys()
     keys.sort()
     for key in keys:
-      allowed_list = dictio[key]
+      allowed_list = sorted(dictio[key])
       xml_data += '\n <portal_type id="%s">' %(key,)
       for allowed_item in allowed_list:
         xml_data += '\n  <item>%s</item>' %(allowed_item,)