diff options
Diffstat (limited to 'addons/project_long_term/test/schedule_project_tasks.yml')
| -rw-r--r-- | addons/project_long_term/test/schedule_project_tasks.yml | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/addons/project_long_term/test/schedule_project_tasks.yml b/addons/project_long_term/test/schedule_project_tasks.yml index 825b7c404d9..17db7ef8038 100644 --- a/addons/project_long_term/test/schedule_project_tasks.yml +++ b/addons/project_long_term/test/schedule_project_tasks.yml @@ -11,26 +11,17 @@ - project.res_users_tester - project.res_users_analyst - project.res_users_finacial_manager - + - Create phase 'Develop GUI' in thunderbird - !record {model: project.phase, id: project_phase_phase1}: - date_start: !eval time.strftime('%Y-%m-%d') + date_start: !eval time.strftime('%Y-%m-%d %H:%M:%S') duration: 200.0 name: Develop GUI in thunderbird product_uom: product.uom_day project_id: project_project_project1 state: draft - resource_ids: - - resource_id: project_long_term.resource_analyst - useability: 80.0 - - resource_id: project_long_term.resource_developer - useability: 30.0 - - resource_id: project_long_term.resource_designer - useability: 30.0 - - - Create the phase task 'Develop GUI for Server Configuration' - @@ -76,8 +67,7 @@ phase_id: project_phase_phase1 project_id: project_project_project1 user_id: project.res_users_designer - - + - Schedule tasks - @@ -88,7 +78,9 @@ Check if tasks scheduled, check that either of task's start_date, end_date and user_id is not null - !python {model: project.project}: | - prj = self.browse(cr, uid, [ref("project_project_project1")])[0] - for task in prj.tasks: - if (not task.user_id) or (not task.date_start) or (not task.date_end): - raise AssertionError("Project Tasks not scheduled") + prj = self.browse(cr, uid, [ref("project_project_project1")])[0] + for task in prj.tasks: + if task.state in ('done','cancelled'): + continue + if (not task.user_id) or (not task.date_start) or (not task.date_end): + raise AssertionError("Project tasks not scheduled!") |
