- 
  Create a project 'Develop yaml Project Module'.
- 
  !record {model: project.project, id: project_project_developyamlproject_2}:
    name: "Develop Yaml Project Module"
    date_start: !eval time.strftime('%Y-%m-%d')

- 
  I have set Working Time from Monday to  Friday from 9am to 17pm.
- 
  !record {model: resource.calendar, id: resource_calendar_hoursweekstest_P2}:
    name: "from Monday to  Friday, from 9am to 17pm"

- 
  I have set Day1 Working Time for Monday to  Friday from 9am to 17pm working hour
- 
  !record {model: resource.calendar.attendance, id: resource_calendar_hoursweekstest_P2day1}:
    name: "Day1"
    hour_from : 09.00
    hour_to : 17.00
    dayofweek : "0"
    calendar_id : resource_calendar_hoursweekstest_P2

- 
  I have set Day2 Working Time for Monday to  Friday from 9am to 17pm working hour
- 
  !record {model: resource.calendar.attendance, id: rresource_calendar_hoursweekstest_P2day2}:
    name: "Day2"
    hour_from : 09.00
    hour_to : 17.00
    dayofweek : "1"
    calendar_id : resource_calendar_hoursweekstest_P2
    
- 
  I have set Day3 Working Time for Monday to  Friday from 9am to 17pm working hour
- 
  !record {model: resource.calendar.attendance, id: resource_calendar_hoursweekstest_P2day3}:
    name: "Day3"
    hour_from : 09.00
    hour_to : 17.00
    dayofweek : "2"    
    calendar_id : resource_calendar_hoursweekstest_P2

- 
  I have set Day4 Working Time for Monday to  Friday from 9am to 17pm working hour
- 
  !record {model: resource.calendar.attendance, id: resource_calendar_hoursweekstest_P2day4}:
    name: "Day4"
    hour_from: 09.00
    hour_to: 17.00
    dayofweek: "3"
    calendar_id: resource_calendar_hoursweekstest_P2

- 
  I have set Day5 Working Time for Monday to  Friday from 9am to 17pm working hour
-
  !record {model: resource.calendar.attendance, id: resource_calendar_hoursweekstest_P2day5}:
    name: "Day5"
    hour_from: 09.00
    hour_to: 17.00
    dayofweek: "4"
    calendar_id: resource_calendar_hoursweekstest_P2

- 
  Now Set working period to  Project 'Develop yaml Project Module'
- 
  !python {model: project.project}: |  
    self.write(cr, uid, [ref("project_project_developyamlproject_2")], {'resource_calendar_id': ref("resource_calendar_hoursweekstest_P2")})

- 
  Create 3 a project phase.
  First 'Analysis Flow for Yaml'Project Phase
- 
  !record {model: project.phase, id:  project_project_developyamlproject_2_Phase1}:
    date_start: !eval time.strftime('%Y-%m-%d')
    duration: 5.0
    name: "Analysis Flow for Yaml"
    product_uom: product.uom_day
    project_id: project_project_developyamlproject_2
    state: draft
    
- 
  Create project phase 'Develop yaml'
- 
  !record {model: project.phase, id:  project_project_developyamlproject_2_Phase2}:
    duration: 5.0
    name: Develop Yaml
    product_uom: product.uom_day
    project_id: project_project_developyamlproject_2
    previous_phase_ids:
      -  project_project_developyamlproject_2_Phase1
       
- 
  Create project phase 'Test Yaml'
- 
  !record {model: project.phase, id:  project_project_developyamlproject_2_Phase3}:
    duration: 5.0
    name: Testing Yaml
    product_uom: product.uom_day
    project_id: project_project_developyamlproject_2
    previous_phase_ids:
      -  project_project_developyamlproject_2_Phase2    
    
- 
  Compute Schedule of phases For One project 
- 
  !record {model: project.compute.phases, id: project_compute_phases_0}:
    project_id: project_project_developyamlproject_2
    target_project: one
    
- 
  Schedule project phases using Compute Phase Scheduling
- 
  !python {model: project.project}: |
    self.schedule_phases(cr, uid, [ref("project_project_developyamlproject_2")])
      
-
  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_developyamlproject_2")])[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")      
      

