diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_printAsODSMonthly.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_printAsODSMonthly.xml index 49cf2902ca8010da60daa8b14bd8b03f8dcf8416..52146b944742ec0f5e3c1544453b5e9cadb0924c 100644 --- a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_printAsODSMonthly.xml +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_printAsODSMonthly.xml @@ -113,6 +113,11 @@ monthly_worker_quantity_dict = {} # Used to get quantity per month and per worke for task_line in task_line_list:\n # initialize some variables\n source = task_line.getSource()\n + if source is None:\n + # This should not happens, so display an error message\n + raise ValueError, context.Base_translateString(\\\n + "This task should have a source : ${task_relative_url}",\n + mapping = {\'task_relative_url\': task.getRelativeUrl()})\n source_title = task_line.getSourceTitle()\n start_date_task = task_line.getStartDate()\n stop_date_task = task_line.getStopDate()\n @@ -254,6 +259,7 @@ return context.Project_viewODSMonthlyReport()\n <string>monthly_worker_quantity_dict</string> <string>task_line</string> <string>source</string> + <string>ValueError</string> <string>source_title</string> <string>start_date_task</string> <string>stop_date_task</string> diff --git a/bt5/erp5_project/bt/revision b/bt5/erp5_project/bt/revision index 6f4cec90d97e3a1765e48b3211c2c1ea1c46bb1d..4f723a9099d9f992e0be081dc9d8cb08eb1385d3 100644 --- a/bt5/erp5_project/bt/revision +++ b/bt5/erp5_project/bt/revision @@ -1 +1 @@ -608 \ No newline at end of file +610 \ No newline at end of file