Commit cb632afa authored by Sebastien Robin's avatar Sebastien Robin

2009-10-28 Seb

* Make the report working even if stop dates are not defined everywhere

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30053 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0efa5306
...@@ -100,7 +100,7 @@ if len(project_uid_list):\n ...@@ -100,7 +100,7 @@ if len(project_uid_list):\n
milestone_list = [x for x in portal.portal_catalog(parent_uid=project_uid_list,\n milestone_list = [x for x in portal.portal_catalog(parent_uid=project_uid_list,\n
portal_type=\'Project Milestone\', select_dict=select_dict, **sql_kw)]\n portal_type=\'Project Milestone\', select_dict=select_dict, **sql_kw)]\n
\n \n
milestone_list.sort(key = lambda x: (x.parent_title, x.stop_date, x.title))\n milestone_list.sort(key = lambda x: (x.parent_title, getattr(x, \'stop_date\', None), x.title))\n
\n \n
for milestone in milestone_list:\n for milestone in milestone_list:\n
# We wish to display the project only for the first milestone\n # We wish to display the project only for the first milestone\n
...@@ -109,7 +109,7 @@ for milestone in milestone_list:\n ...@@ -109,7 +109,7 @@ for milestone in milestone_list:\n
parent_title = milestone.parent_title\n parent_title = milestone.parent_title\n
line_kw[\'project_title\'] = milestone.parent_title\n line_kw[\'project_title\'] = milestone.parent_title\n
line_kw[\'milestone_title\'] = milestone.title\n line_kw[\'milestone_title\'] = milestone.title\n
line_kw[\'stop_date\'] = milestone.stop_date\n line_kw[\'stop_date\'] = getattr(milestone, \'stop_date\', None)\n
listbox.append(line_kw)\n listbox.append(line_kw)\n
\n \n
context.Base_updateDialogForm(listbox=listbox, empty_line_number=0)\n context.Base_updateDialogForm(listbox=listbox, empty_line_number=0)\n
...@@ -189,6 +189,7 @@ return context.ProjectModule_viewMilestoneReport()\n ...@@ -189,6 +189,7 @@ return context.ProjectModule_viewMilestoneReport()\n
<string>milestone</string> <string>milestone</string>
<string>line_kw</string> <string>line_kw</string>
<string>parent_title</string> <string>parent_title</string>
<string>getattr</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
684 687
\ 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