[IMP] Project_long_term : YAML Test cases imporvments
bzr revid: jam@tinyerp.com-20110106114112-97hxf6myeuvyvnar
This commit is contained in:
parent
1e5bc28b7b
commit
3917684c06
|
@ -41,7 +41,8 @@ Features.
|
|||
"demo_xml": ["project_long_term_demo.xml"],
|
||||
"test": [
|
||||
'test/schedule_project_phases.yml',
|
||||
'test/project_schedule_consecutive_day.yml'
|
||||
'test/project_schedule_consecutive_day.yml',
|
||||
'test/project_schedule_without_wroking_hour.yml'
|
||||
# 'test/schedule_project_tasks.yml',
|
||||
# 'test/test_project_long_term.yml',
|
||||
# 'test/schedule_phase_tasks.yml',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
-
|
||||
Create a project 'Develop yaml Project Module' starting on 01/05/2010.
|
||||
Create a project 'Develop yaml Project Module'.
|
||||
-
|
||||
!record {model: project.project, id: project_project_developyamlproject0}:
|
||||
name: "Develop Yaml Project Module"
|
||||
|
@ -72,7 +72,7 @@
|
|||
First 'Analysis Flow for Yaml'Project Phase
|
||||
-
|
||||
!record {model: project.phase, id: project_phase_analysisflowforyaml0}:
|
||||
date_start: '2010-01-05'
|
||||
date_start: !eval time.strftime('%Y-%m-%d')
|
||||
duration: 5.0
|
||||
name: "Analysis Flow for Yaml"
|
||||
product_uom: product.uom_day
|
||||
|
@ -84,7 +84,6 @@
|
|||
Create project phase 'Develop yaml'
|
||||
-
|
||||
!record {model: project.phase, id: project_phase_establishingprojectfeasibility0}:
|
||||
date_start: '2010-01-05'
|
||||
duration: 5.0
|
||||
name: Develop Yaml
|
||||
product_uom: product.uom_day
|
||||
|
@ -96,7 +95,6 @@
|
|||
Create project phase 'Test Yaml'
|
||||
-
|
||||
!record {model: project.phase, id: project_phase_preparationofengineeringdesigns0}:
|
||||
date_start: '2010-01-05'
|
||||
duration: 5.0
|
||||
name: Testing Yaml
|
||||
product_uom: product.uom_day
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
-
|
||||
Create a project 'Develop yaml Implementation Module'.
|
||||
-
|
||||
!record {model: project.project, id: project_project_developyamlproject0}:
|
||||
name: "Develop Yaml Project Module"
|
||||
date_start: !eval time.strftime('%Y-%m-%d')
|
||||
|
||||
-
|
||||
Create 4 Project phase.
|
||||
First Project Phase 'Analysis Flow for Yaml'
|
||||
-
|
||||
!record {model: project.phase, id: project_phase_analysisflowforyaml0}:
|
||||
date_start: !eval time.strftime('%Y-%m-%d')
|
||||
duration: 6.0
|
||||
product_uom: product.uom_day
|
||||
name: "Analysis Flow for Yaml"
|
||||
project_id: project_project_developyamlproject0
|
||||
responsible_id: project.res_users_analyst
|
||||
state: draft
|
||||
|
||||
-
|
||||
Create project phase 'Develop yaml'
|
||||
-
|
||||
!record {model: project.phase, id: project_phase_establishingprojectfeasibility0}:
|
||||
duration: 6.0
|
||||
product_uom: product.uom_day
|
||||
product_uom: product.uom_day
|
||||
project_id: project_project_developyamlproject0
|
||||
previous_phase_ids:
|
||||
- project_phase_analysisflowforyaml0
|
||||
state: draft
|
||||
-
|
||||
Create project phase 'Test Yaml'
|
||||
-
|
||||
!record {model: project.phase, id: project_phase_preparationofengineeringdesigns0}:
|
||||
duration: 6.0
|
||||
name: Testing Yaml
|
||||
product_uom: product.uom_day
|
||||
project_id: project_project_developyamlproject0
|
||||
previous_phase_ids:
|
||||
- project_phase_establishingprojectfeasibility0
|
||||
state: draft
|
||||
|
||||
-
|
||||
Create project phase 'Implement Yaml'
|
||||
-
|
||||
!record {model: project.phase, id: project_phase_implementingreadycase0}:
|
||||
duration: 6.0
|
||||
name: Testing Yaml
|
||||
product_uom: product.uom_day
|
||||
project_id: project_project_developyamlproject0
|
||||
previous_phase_ids:
|
||||
- project_phase_preparationofengineeringdesigns0
|
||||
state: draft
|
||||
-
|
||||
Compute Schedule of phases For One project
|
||||
-
|
||||
!record {model: project.compute.phases, id: project_compute_phases_0}:
|
||||
project_id: project_project_developyamlproject0
|
||||
target_project: one
|
||||
|
||||
-
|
||||
Schedule project phases using Compute Phase Scheduling
|
||||
-
|
||||
!python {model: project.project}: |
|
||||
self.schedule_phases(cr, uid, [ref("project_project_developyamlproject0")])
|
||||
|
||||
-
|
||||
After scheduling, Check that phases scheduled, check that either of phase's start_date, end_date not null.
|
||||
-
|
||||
!python {model: project.project}: |
|
||||
proj=self.browse(cr, uid, [ref("project_project_developyamlproject0")])[0]
|
||||
for phase in proj.phase_ids:
|
||||
if (not phase.responsible_id) or (not phase.date_start) or (not phase.date_end):
|
||||
raise AssertionError("Phases not scheduled")
|
||||
|
||||
|
Loading…
Reference in New Issue