Commit 43a5f7a6 authored by Nicolas Delaby's avatar Nicolas Delaby

improve script

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39920 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1a6ff044
...@@ -50,12 +50,16 @@ ...@@ -50,12 +50,16 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if context.Item_getResourceValue() != None:\n <value> <string>resource_value = context.Item_getResourceValue()\n
result = context.Item_getResourceValue() and context.Item_getResourceValue().getQuantityUnitList() and [(\'\', \'\')] + [(x.getTranslatedLogicalPath(), x.getCategoryRelativeUrl(base=0)) for x in context.Item_getResourceValue().getQuantityUnitValueList()] or [(\'\', \'\')]\n movement_value = context.getAggregateRelatedValue()\n
\n \n
else:\n result_item_list = [(\'\', \'\')]\n
result = [(x.getTranslatedLogicalPath(), x.getCategoryRelativeUrl(base=0)) for x in context.getAggregateRelatedValue().getQuantityUnitValueList()] or [(\'\', \'\')]\n if resource_value is not None:\n
return result\n result_item_list.extend([(x.getTranslatedLogicalPath(), x.getCategoryRelativeUrl(base=0)) for x in resource_value.getQuantityUnitValueList()])\n
elif movement_value is not None:\n
result_item_list.extend([(x.getTranslatedLogicalPath(), x.getCategoryRelativeUrl(base=0)) for x in movement_value.getQuantityUnitValueList()])\n
\n
return result_item_list\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -94,12 +98,14 @@ return result\n ...@@ -94,12 +98,14 @@ return result\n
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>resource_value</string>
<string>movement_value</string>
<string>result_item_list</string>
<string>None</string> <string>None</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>x</string> <string>x</string>
<string>result</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
212 216
\ No newline at end of file \ 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