diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getOrderedActiveProcessList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ActiveProcess_sense.xml similarity index 74% rename from product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getOrderedActiveProcessList.xml rename to product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ActiveProcess_sense.xml index 327ecd3be3e32a6af84019b7514d95106a010df3..96e78299f3d909f1efcac84cadb66b8560a56568 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getOrderedActiveProcessList.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ActiveProcess_sense.xml @@ -53,31 +53,19 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>"""\n - Returns active processes related to an Alarm \n - ordered by data. sense_value is calculated\n - using the Alarm itself.\n -\n - TODO: optimisation of list method to compute values\n - only on the currently displayed range\n - TODO2: optimisation of sense_value through cache\n -"""\n -\n -def sort_date(a,b):\n - return - cmp(a.getStartDate(), b.getStartDate())\n -\n -process_list = context.getCausalityRelatedValueList()\n -process_list.sort(sort_date)\n -return_list = []\n -for process in process_list:\n - process_id = process.getId()\n - start_date = process.getStartDate()\n - sense_value = context.sense(process=process)\n - return_list.append(context.asContext(process_id=process.getId(), \n - start_date=process.getStartDate(),\n - sense_value=sense_value))\n -return return_list\n -</string> </value> + <value> <string encoding="cdata"><![CDATA[ + +for result in context.getResultList():\n + # This is useful is result is returned as a Return instance\n + if result.severity > result.INFO:\n + return True\n + # This is the default case\n + if getattr(result, \'result\', False):\n + return True\n +return False\n + + +]]></string> </value> </item> <item> <key> <string>_code</string> </key> @@ -114,16 +102,13 @@ return return_list\n <value> <tuple> <string>kw</string> - <string>sort_date</string> + <string>_getiter_</string> <string>_getattr_</string> <string>context</string> - <string>process_list</string> - <string>return_list</string> - <string>_getiter_</string> - <string>process</string> - <string>process_id</string> - <string>start_date</string> - <string>sense_value</string> + <string>result</string> + <string>True</string> + <string>getattr</string> + <string>False</string> </tuple> </value> </item> @@ -140,7 +125,7 @@ return return_list\n </item> <item> <key> <string>id</string> </key> - <value> <string>Alarm_getOrderedActiveProcessList</string> </value> + <value> <string>ActiveProcess_sense</string> </value> </item> <item> <key> <string>warnings</string> </key> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportURL.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportURL.xml index 0f5eee72f42b9e9987f68abb82d1fccab97b32f4..f1af1ced62adc0e04684ee65e6bb2a3ad821048d 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportURL.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportURL.xml @@ -61,7 +61,7 @@ if object is None:\n \n url = context.absolute_url()\n method = context.getReportMethodId(\'Alarm_viewReport\')\n -kw = { \'active_process\' : \'portal_activities/%s\' % object.process_id,\n +kw = { \'active_process\' : \'portal_activities/%s\' % object.id,\n \'reset\' : \'1\', \n }\n \n diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_view/listbox.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_view/listbox.xml index f2220f06c40c544371de29a1195ec611dce401fc..2275240db24d5835fca0a43e51dc155395a556fe 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_view/listbox.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_view/listbox.xml @@ -179,10 +179,18 @@ <key> <string>alternate_name</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>anchor</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>columns</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>count_method</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>css_class</string> </key> <value> <string></string> </value> @@ -193,7 +201,9 @@ </item> <item> <key> <string>default_params</string> </key> - <value> <string></string> </value> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> </item> <item> <key> <string>description</string> </key> @@ -247,6 +257,10 @@ <key> <string>meta_types</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>page_template</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>portal_types</string> </key> <value> <string></string> </value> @@ -295,6 +309,10 @@ <key> <string>title</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>untranslatable_columns</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>url_columns</string> </key> <value> <string></string> </value> @@ -327,12 +345,16 @@ <key> <string>alternate_name</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>anchor</string> </key> + <value> <int>0</int> </value> + </item> <item> <key> <string>columns</string> </key> <value> <list> <tuple> - <string>process_id</string> + <string>id</string> <string>ID</string> </tuple> <tuple> @@ -340,7 +362,7 @@ <string>Date</string> </tuple> <tuple> - <string>sense_value</string> + <string>ActiveProcess_sense</string> <string>Problem Detected</string> </tuple> </list> @@ -385,12 +407,7 @@ <item> <key> <string>editable_columns</string> </key> <value> - <list> - <tuple> - <string>id</string> - <string>Id</string> - </tuple> - </list> + <list/> </value> </item> <item> @@ -422,7 +439,7 @@ <item> <key> <string>list_method</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> </value> </item> <item> @@ -438,7 +455,12 @@ <item> <key> <string>portal_types</string> </key> <value> - <list/> + <list> + <tuple> + <string>Active Process</string> + <string>Active Process</string> + </tuple> + </list> </value> </item> <item> @@ -472,7 +494,12 @@ <item> <key> <string>sort</string> </key> <value> - <list/> + <list> + <tuple> + <string>creation_date</string> + <string>DESC</string> + </tuple> + </list> </value> </item> <item> @@ -495,12 +522,18 @@ <key> <string>title</string> </key> <value> <string>Active Processes</string> </value> </item> + <item> + <key> <string>untranslatable_columns</string> </key> + <value> + <list/> + </value> + </item> <item> <key> <string>url_columns</string> </key> <value> <list> <tuple> - <string>process_id</string> + <string>id</string> <string>Alarm_getReportURL</string> </tuple> <tuple> @@ -508,7 +541,7 @@ <string>Alarm_getReportURL</string> </tuple> <tuple> - <string>sense_value</string> + <string>ActiveProcess_sense</string> <string>Alarm_getReportURL</string> </tuple> </list> @@ -521,6 +554,22 @@ </pickle> </record> <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: [(\'causality_uid\',here.getUid()),]</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> <pickle> <tuple> <global name="Method" module="Products.Formulator.MethodField"/> @@ -531,7 +580,7 @@ <dictionary> <item> <key> <string>method_name</string> </key> - <value> <string>Alarm_getOrderedActiveProcessList</string> </value> + <value> <string>portal_catalog</string> </value> </item> </dictionary> </pickle> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 8ea0a3e6f1099fb1b729b3dfc57bbf3c120f451d..3d3f9551e6ffbdf8c021b38b4edd35646a5c3582 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -971 \ No newline at end of file +973 \ No newline at end of file