-
   Create an issue
-
   !record {model: project.issue, id: project_issue_stockmovedates0}:
    categ_id: project_issue.bug_categ
    name: Stock Move dates
    project_id: project.project_project_22
    working_hours_close: 0.0
    working_hours_open: 0.0
- 
  Check if issue in 'draft' state
-
  !assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in draft state}:
    - state == 'draft'
        
- 
  Open the issue
- 
  !python {model: project.issue}: |
    self.case_open(cr, uid, [ref("project_issue_stockmovedates0")], {"lang":
      "en_US", "active_ids": [ref("project_issue.menu_project_issue_track")], "tz":
      False, "active_model": "ir.ui.menu", "search_default_project_id": False, "search_default_my_bugs":
      1, "search_default_user_id": 1, "search_default_current_bugs": 1, "project_id":
      False, "active_id": ref("project_issue.menu_project_issue_track"), })
- 
  Check if issue in 'open' state
-
  !assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in open state}:
    - state == 'open'

- 
  Keep issue pending
- 
  !python {model: project.issue}: |
    self.case_pending(cr, uid, [ref("project_issue_stockmovedates0")],
      {"lang": "en_US", "active_ids": [ref("project_issue.menu_project_issue_track")],
      "tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
      False, "search_default_my_bugs": 1, "search_default_user_id": 1, "search_default_current_bugs":
      1, "project_id": False, "active_id": ref("project_issue.menu_project_issue_track"),
      })
- 
  Check if issue in 'pending' state
-
  !assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in pending state}:
    - state == 'pending'
    
    
- 
  Open the issue
- 
  !python {model: project.issue}: |
    self.case_open(cr, uid, [ref("project_issue_stockmovedates0")], {"lang":
      "en_US", "active_ids": [ref("project_issue.menu_project_issue_track")], "tz":
      False, "active_model": "ir.ui.menu", "search_default_project_id": False, "search_default_my_bugs":
      1, "search_default_user_id": 1, "search_default_current_bugs": 1, "project_id":
      False, "active_id": ref("project_issue.menu_project_issue_track"), })
- 
  Check if issue in 'open' state
-
  !assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in open state}:
    - state == 'open'
      

- 
  Cancel the issue
- 
  !python {model: project.issue}: |
    self.case_cancel(cr, uid, [ref("project_issue_stockmovedates0")],
      {"lang": "en_US", "active_ids": [ref("project_issue.menu_project_issue_track")],
      "tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
      False, "search_default_my_bugs": 1, "search_default_user_id": 1, "search_default_current_bugs":
      1, "project_id": False, "active_id": ref("project_issue.menu_project_issue_track"),
      })
- 
  Check if issue in 'cancel' state
-
  !assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in cancel state}:
    - state == 'cancel'

    
- 
  Reset the issue 
- 
  !python {model: project.issue}: |
    self.case_reset(cr, uid, [ref("project_issue_stockmovedates0")],
      {"lang": "en_US", "active_ids": [ref("project_issue.menu_project_issue_track")],
      "tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
      False, "search_default_my_bugs": 1, "search_default_user_id": 1, "search_default_current_bugs":
      1, "project_id": False, "active_id": ref("project_issue.menu_project_issue_track"),
      })
- 
  Check if issue in 'draft' state
-
  !assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in draft state}:
    - state == 'draft'


- 
  Close the issue
- 
  !python {model: project.issue}: |
    self.case_close(cr, uid, [ref("project_issue_stockmovedates0")],
      {"lang": "en_US", "active_ids": [ref("project_issue.menu_project_issue_track")],
      "tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
      False, "search_default_my_bugs": 1, "search_default_user_id": 1, "search_default_current_bugs":
      1, "project_id": False, "active_id": ref("project_issue.menu_project_issue_track"),
      })
- 
  Check if issue in 'done' state
-
  !assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in done state}:
    - state == 'done'
