[Erp5-report] r45203 lucas - in /erp5/trunk/bt5/erp5_configurator: SkinTemplateItem/portal_...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 7 21:58:16 CEST 2011


Author: lucas
Date: Thu Apr  7 21:58:16 2011
New Revision: 45203

URL: http://svn.erp5.org?rev=45203&view=rev
Log:
2011-04-07 lucas
* The ConfiguratorTool_getAvailableBusinessConfigurationList must return a list of tuples following the appropriated order, such list is used to render the business configuration in the new user interface.

Modified:
    erp5/trunk/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_getAvailableBusinessConfigurationList.xml
    erp5/trunk/bt5/erp5_configurator/bt/change_log
    erp5/trunk/bt5/erp5_configurator/bt/revision

Modified: erp5/trunk/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_getAvailableBusinessConfigurationList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_getAvailableBusinessConfigurationList.xml?rev=45203&r1=45202&r2=45203&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_getAvailableBusinessConfigurationList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_getAvailableBusinessConfigurationList.xml [utf8] Thu Apr  7 21:58:16 2011
@@ -51,19 +51,22 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>"""\n
- We should exclude configurations which already used. A workflow \n
- could help on this situation.\n
+ Returns a list of tuple with max three business configuration for each tuple.\n
+ The business configurations without Resource and with the state of the related workflow\n
+ equals to \'End\' are just ignored.\n
 """\n
-\n
 bc_list = context.business_configuration_module.searchFolder(portal_type="Business Configuration")\n
-result_list = []\n
-for business_configuration in bc_list:\n
-  if None not in [business_configuration.getResource()]:\n
-    title = business_configuration.getTitle()\n
-    relative_url = business_configuration.getRelativeUrl()\n
-    result_list.append((title, relative_url))\n
+bc_list = [bc for bc in bc_list if bc.getResource() is not None and bc.getCurrentStateTitle() not in ("End",)]\n
 \n
-return result_list\n
+bc_tuple_list = []\n
+index = 0\n
+while True:\n
+  part = bc_list[index:index+3]\n
+  if not part:\n
+    return bc_tuple_list\n
+  else:\n
+    bc_tuple_list.append(tuple(part))\n
+    index+=3\n
 </string> </value>
         </item>
         <item>

Modified: erp5/trunk/bt5/erp5_configurator/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_configurator/bt/change_log?rev=45203&r1=45202&r2=45203&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_configurator/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_configurator/bt/change_log [utf8] Thu Apr  7 21:58:16 2011
@@ -1,4 +1,7 @@
 2011-04-07 lucas
+* The ConfiguratorTool_getAvailableBusinessConfigurationList must return a list of tuples following the appropriated order, such list is used to render the business configuration in the new user interface.
+
+2011-04-07 lucas
 * Removed obsolete Start button.
 
 2011-04-07 lucas

Modified: erp5/trunk/bt5/erp5_configurator/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_configurator/bt/revision?rev=45203&r1=45202&r2=45203&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_configurator/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_configurator/bt/revision [utf8] Thu Apr  7 21:58:16 2011
@@ -1 +1 @@
-512
\ No newline at end of file
+513
\ No newline at end of file



More information about the Erp5-report mailing list