- 
  Create a analytic planning 'Project Planning'
- 
  !record {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0}:
    business_days: 20
    date_from: '2010-06-01'
    date_to: '2010-06-30'
    name: Project Planning
    state: draft
    user_id: base.user_demo
    
    
- 
  Open the planning
- 
  !python {model: report_account_analytic.planning}: |
    self.action_open(cr, uid, [ref("report_account_analytic_planning_projectplanning0")],
      {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")],
      "tz": False, "active_model": "ir.ui.menu", "section_id": False, "active_id":
      ref("project_planning.menu_report_account_analytic_planning"), "search_default_user_id":
      1, "project_id": False, "department_id": False, })
-
   Check if planning in open state
-
   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in open state}:     
     - state == "open"

- 
  Cancel the planning
- 
  !python {model: report_account_analytic.planning}: |
    self.action_cancel(cr, uid, [ref("report_account_analytic_planning_projectplanning0")],
      {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")],
      "tz": False, "active_model": "ir.ui.menu", "section_id": False, "active_id":
      ref("project_planning.menu_report_account_analytic_planning"), "search_default_user_id":
      1, "project_id": False, "department_id": False, })
-
   Check if planning in cancel state
-
   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in cancel state}:     
     - state == "cancel"    
    
- 
  Reopen the planning
- 
  !python {model: report_account_analytic.planning}: |
    self.action_draft(cr, uid, [ref("report_account_analytic_planning_projectplanning0")],
      {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")],
      "tz": False, "active_model": "ir.ui.menu", "section_id": False, "active_id":
      ref("project_planning.menu_report_account_analytic_planning"), "search_default_user_id":
      1, "project_id": False, "department_id": False, })
-
   Check if planning in draft state
-
   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in draft state}:     
     - state == "draft"   
    
- 
  Open the planning
- 
  !python {model: report_account_analytic.planning}: |
    self.action_open(cr, uid, [ref("report_account_analytic_planning_projectplanning0")],
      {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")],
      "tz": False, "active_model": "ir.ui.menu", "section_id": False, "active_id":
      ref("project_planning.menu_report_account_analytic_planning"), "search_default_user_id":
      1, "project_id": False, "department_id": False, })
-
   Check if planning in open state
-
   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in open state}:     
     - state == "open"    
    
- 
  Close the planning
- 
  !python {model: report_account_analytic.planning}: |
    self.action_done(cr, uid, [ref("report_account_analytic_planning_projectplanning0")],
      {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")],
      "tz": False, "active_model": "ir.ui.menu", "section_id": False, "active_id":
      ref("project_planning.menu_report_account_analytic_planning"), "search_default_user_id":
      1, "project_id": False, "department_id": False, })
-
   Check if planning in done state
-
   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in done state}:     
     - state == "done"