Commit ffc27259 authored by Romain Courteaud's avatar Romain Courteaud

Fix TaskReportModule_generateProjectDomain in order to display correctly related Projects

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20039 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 386c94bd
...@@ -68,18 +68,28 @@ ...@@ -68,18 +68,28 @@
<value> <string>request = context.REQUEST\n <value> <string>request = context.REQUEST\n
domain_list = []\n domain_list = []\n
\n \n
\n
if depth == 0:\n if depth == 0:\n
category_list = [ ]\n category_list = []\n
for i in context.portal_selections.getSelectionValueList(context=context,\n for task in context.portal_selections.getSelectionValueList(context=context,\n
selection_name= \'task_report_module_selection\'):\n selection_name=\'task_report_module_selection\'):\n
category_list.extend([j for j in i.getSourceProjectValueList(portal_type="Project") if j not in category_list])\n source_project_value_list = \\\n
task.getSourceProjectValueList(portal_type=["Project", "Project Line"])\n
for source_project_value in source_project_value_list:\n
if source_project_value.getPortalType() == \'Project\':\n
category = source_project_value\n
else:\n
category = source_project_value.getExplanationValue()\n
if category not in category_list:\n
category_list.append(category)\n
\n \n
else:\n else:\n
category_list = [ ]\n category_list = []\n
for i in context.portal_selections.getSelectionValueList(context=context,\n for i in context.portal_selections.getSelectionValueList(context=context,\n
selection_name=\'task_report_module_selection\'):\n selection_name=\'task_report_module_selection\'):\n
category_list.extend([j for j in i.getSourceProjectValueList(portal_type=["Project Line", "Project Milestones"]) \\\n category_list.extend([j for j in i.getSourceProjectValueList(portal_type=["Project Line", "Project Milestones"]) \\\n
if (j not in category_list) and ( j.getParentRelativeUrl() in parent.getMembershipCriterionCategoryList()) ])\n if (j not in category_list) and (j.getParentRelativeUrl() in parent.getMembershipCriterionCategoryList())])\n
\n
\n \n
for category in category_list:\n for category in category_list:\n
domain = parent.generateTempDomain(id = \'sub\' + category.getId() )\n domain = parent.generateTempDomain(id = \'sub\' + category.getId() )\n
...@@ -143,11 +153,14 @@ return domain_list\n ...@@ -143,11 +153,14 @@ return domain_list\n
<string>domain_list</string> <string>domain_list</string>
<string>category_list</string> <string>category_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>task</string>
<string>source_project_value_list</string>
<string>source_project_value</string>
<string>category</string>
<string>i</string> <string>i</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
<string>j</string> <string>j</string>
<string>category</string>
<string>domain</string> <string>domain</string>
<string>script</string> <string>script</string>
</tuple> </tuple>
......
445 446
\ 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