Commit 65414f15 authored by Nicolas Delaby's avatar Nicolas Delaby

Handle None values

Change listbox column ids

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22311 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4453da0d
......@@ -67,7 +67,7 @@
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Document import newTempBase\n
catalog = context.portal_catalog.getResultValue\n
if current == 1:\n
if current:\n
method = context.portal_simulation.getCurrentTrackingList\n
else:\n
method = context.portal_simulation.getTrackingList\n
......@@ -84,16 +84,18 @@ kw[\'item.simulation_state\'] = simulation_state\n
for res in method(aggregate_uid=uid, **kw):\n
history = newTempBase(context, str(len(history_list)))\n
explanation = catalog(uid=res.delivery_uid).getExplanationValue()\n
\n
node_value = catalog(uid=res.node_uid)\n
section_value = catalog(uid=res.section_uid)\n
resource_value = catalog(uid=res.resource_uid)\n
history.edit(\n
#uid = catalog(uid=res.uid).getTitle(),\n
date=res.date,\n
node_uid=catalog(uid=res.node_uid).getTitle(),\n
section_uid=catalog(uid=res.section_uid).getTitle(),\n
resource_uid=catalog(uid=res.resource_uid).getTitle(),\n
node_title=node_value is not None and node_value.getTitle() or None,\n
section_title=section_value is not None and section_value.getTitle() or None,\n
resource_title=resource_value is not None and resource_value.getTitle() or None,\n
explanation=explanation.getTitle(),\n
url=explanation.absolute_url(),\n
simulation_state = explanation.getTranslatedSimulationState(),\n
simulation_state=explanation.getTranslatedSimulationState(),\n
)\n
history_list.append(history)\n
\n
......@@ -120,7 +122,7 @@ return history_list\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>current=1,*args, **kw</string> </value>
<value> <string>current=1, *args, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -166,6 +168,10 @@ return history_list\n
<string>len</string>
<string>history</string>
<string>explanation</string>
<string>node_value</string>
<string>section_value</string>
<string>resource_value</string>
<string>None</string>
</tuple>
</value>
</item>
......
......@@ -82,7 +82,7 @@
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
......@@ -94,15 +94,15 @@
<string>Date</string>
</tuple>
<tuple>
<string>node_uid</string>
<string>node_title</string>
<string>Node</string>
</tuple>
<tuple>
<string>section_uid</string>
<string>section_title</string>
<string>Section</string>
</tuple>
<tuple>
<string>resource_uid</string>
<string>resource_title</string>
<string>Resource</string>
</tuple>
<tuple>
......@@ -113,7 +113,7 @@
</value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
......@@ -132,21 +132,21 @@
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>list_action</string> </key>
<key> <string>list_action</string> </key>
<value> <string>Item_viewTrackingList</string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<key> <string>selection_name</string> </key>
<value> <string>item_tracking_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
......@@ -161,11 +161,11 @@
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>title</string> </key>
<value> <string>Item Tracking</string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
<key> <string>url_columns</string> </key>
<value>
<list>
<tuple>
......
49
\ No newline at end of file
50
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment