Commit 58401d97 authored by Jérome Perrin's avatar Jérome Perrin

restore enhanced function handling from r15620 and r15655

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15709 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 724c80d8
......@@ -139,7 +139,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(context.portal_categories.function, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))()</string> </value>
<value> <string>python: getattr(context.portal_categories.function, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(filter_node=1)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -73,16 +73,22 @@
and extend it with all possible functions.\n
"""\n
\n
portal = context.getPortalObject()\n
category_child_item_list_method_id = portal.portal_preferences.getPreference(\n
\'preferred_category_child_item_list_method_id\',\n
\'getCategoryChildCompactLogicalPathItemList\')\n
result = []\n
\n
if context.getSubordination():\n
subordination_value = context.getSubordinationValue()\n
if subordination_value is not None:\n
if subordination_value.getFunction():\n
function_value = subordination_value.getFunctionValue()\n
if function_value is not None:\n
result.extend(function_value.getCategoryChildCompactLogicalPathItemList(filter_node=1))\n
function_value = subordination_value.getFunctionValue()\n
if function_value is not None:\n
result.extend(getattr(function_value, category_child_item_list_method_id)(filter_node=1))\n
\n
result.extend(context.portal_categories.function.getCategoryChildCompactLogicalPathItemList(filter_node=1))\n
result.extend(getattr(\n
portal.portal_categories.function,\n
category_child_item_list_method_id)(filter_node=1))\n
\n
return result\n
</string> </value>
......@@ -127,12 +133,15 @@ return result\n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>result</string>
<string>_getattr_</string>
<string>context</string>
<string>context</string>
<string>portal</string>
<string>category_child_item_list_method_id</string>
<string>result</string>
<string>subordination_value</string>
<string>None</string>
<string>function_value</string>
<string>getattr</string>
</tuple>
</value>
</item>
......
......@@ -61,7 +61,7 @@
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -73,7 +73,7 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
......@@ -83,7 +83,7 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
......@@ -94,7 +94,7 @@
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<key> <string>description</string> </key>
<value> <string>The function assigned to the person.</string> </value>
</item>
<item>
......@@ -106,7 +106,7 @@
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<key> <string>items</string> </key>
<value>
<list/>
</value>
......@@ -116,7 +116,7 @@
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>title</string> </key>
<value> <string>Function</string> </value>
</item>
</dictionary>
......@@ -139,7 +139,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(context.portal_categories.function, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))()</string> </value>
<value> <string>here/Career_getFunctionItemList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -94,7 +94,7 @@
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<key> <string>description</string> </key>
<value> <string>The function of the organisation.</string> </value>
</item>
<item>
......@@ -106,7 +106,7 @@
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<key> <string>items</string> </key>
<value>
<list/>
</value>
......@@ -116,7 +116,7 @@
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>title</string> </key>
<value> <string>Function</string> </value>
</item>
</dictionary>
......@@ -139,7 +139,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(context.portal_categories.function, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(filter_leaves=1)</string> </value>
<value> <string>python: getattr(context.portal_categories.function, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(filter_leave=1)</string> </value>
</item>
</dictionary>
</pickle>
......
144
\ No newline at end of file
145
\ 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