Commit 23c2659c authored by Sebastien Robin's avatar Sebastien Robin

make sure to return only task lines related to the current project

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19869 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b966b353
...@@ -65,9 +65,13 @@ ...@@ -65,9 +65,13 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>task_list = [x.getObject() for x in \\\n <value> <string>source_project_uid_list = [x.uid for x in context.portal_catalog(\n
relative_url=\'%s%%\' % context.getRelativeUrl())]\n
\n
task_list = [x.getObject() for x in \\\n
context.portal_catalog(selection=selection, selection_report=selection_report, \n context.portal_catalog(selection=selection, selection_report=selection_report, \n
portal_type=\'Task\')]\n portal_type=\'Task\',\n
source_project_uid = source_project_uid_list)]\n
task_line_list = []\n task_line_list = []\n
for task in task_list:\n for task in task_list:\n
task_line_list.extend(task.objectValues(portal_type=\'Task Line\'))\n task_line_list.extend(task.objectValues(portal_type=\'Task Line\'))\n
...@@ -124,6 +128,7 @@ return task_line_list\n ...@@ -124,6 +128,7 @@ return task_line_list\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>x</string> <string>x</string>
<string>source_project_uid_list</string>
<string>task_list</string> <string>task_list</string>
<string>task_line_list</string> <string>task_line_list</string>
<string>task</string> <string>task</string>
......
...@@ -65,27 +65,25 @@ ...@@ -65,27 +65,25 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>task_list = [x.getObject() for x in \\\n <value> <string>source_project_uid_list = [x.uid for x in context.portal_catalog(\n
relative_url=\'%s%%\' % context.getRelativeUrl())]\n
\n
task_list = [x.getObject() for x in \\\n
context.portal_catalog(selection=selection, selection_report=selection_report, \n context.portal_catalog(selection=selection, selection_report=selection_report, \n
portal_type=\'Task\',\n portal_type=\'Task\',\n
source_project_uid = source_project_uid_list,\n
simulation_state=context.getPortalDraftOrderStateList()+\n simulation_state=context.getPortalDraftOrderStateList()+\n
context.getPortalPlannedOrderStateList())]\n context.getPortalPlannedOrderStateList())]\n
task_list.extend([x.getObject() for x in \\\n task_list.extend([x.getObject() for x in \\\n
context.portal_catalog(selection=selection, selection_report=selection_report, \n context.portal_catalog(selection=selection, selection_report=selection_report, \n
portal_type=\'Task Report\',\n portal_type=\'Task Report\',\n
source_project_uid = source_project_uid_list,\n
simulation_state=context.getPortalReservedInventoryStateList()+\n simulation_state=context.getPortalReservedInventoryStateList()+\n
context.getPortalCurrentInventoryStateList())])\n context.getPortalCurrentInventoryStateList())])\n
context.log(\'sql sql for task reports\', context.portal_catalog(selection=selection, \n
selection_report=selection_report, \n
portal_type=\'Task Report\',\n
simulation_state=context.getPortalReservedInventoryStateList()+\n
context.getPortalCurrentInventoryStateList(), src__=1))\n
task_line_list = []\n task_line_list = []\n
for task in task_list:\n for task in task_list:\n
task_line_list.extend(task.objectValues(portal_type=(\'Task Line\', \'Task Report Line\')))\n task_line_list.extend(task.objectValues(portal_type=(\'Task Line\', \'Task Report Line\')))\n
\n \n
#print context.portal_catalog(source_project_uid=context.getUid(), src__=1)\n
#return printed\n
return task_line_list\n return task_line_list\n
</string> </value> </string> </value>
</item> </item>
...@@ -138,6 +136,7 @@ return task_line_list\n ...@@ -138,6 +136,7 @@ return task_line_list\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>x</string> <string>x</string>
<string>source_project_uid_list</string>
<string>task_list</string> <string>task_list</string>
<string>task_line_list</string> <string>task_line_list</string>
<string>task</string> <string>task</string>
......
413 414
\ 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