[Erp5-report] r35729 romain - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri May 28 15:13:47 CEST 2010


Author: romain
Date: Fri May 28 15:13:46 2010
New Revision: 35729

URL: http://svn.erp5.org?rev=35729&view=rev
Log:
Sort skin folder by ID and then by priority.

Modified:
    erp5/trunk/products/ERP5/Document/BusinessTemplate.py

Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=35729&r1=35728&r2=35729&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Fri May 28 15:13:46 2010
@@ -231,6 +231,9 @@
     if (skin_folder_id not in selection_list):
       selection_list.insert(0, skin_folder_id)
     if reorder_skin_selection:
+      # Sort by skin ID
+      selection_list.sort()
+      # Sort by skin priority
       selection_list.sort(
         key=lambda x: x in skin_tool.objectIds() and skin_tool[x].getProperty(
         'business_template_skin_layer_priority', skin_tool[x].meta_type == 'Filesystem Directory View' and -1 or 0) or 0, reverse=True)




More information about the Erp5-report mailing list