-
  I put task in pending due to specification is not clear.
-
  !python {model: project.task}: |
    self.do_pending(cr, uid, [ref("project_task_1")])
    context.update({"active_id": ref("project_task_1")})
-
  I check state  of task after put in pending.
-
  !assert {model: project.task, id: project_task_1, severity: error, string: task should be in pending state}:
    - state == "pending"
-
  !record {model: project.task.delegate, id: delegate_id}:
    user_id: base.user_demo
    planned_hours: 12.0
    planned_hours_me: 2.0
-
  Now I delegate task to team member.
-
  !python {model: project.task.delegate}: |
    self.delegate(cr, uid, [ref("delegate_id")], {"active_id": ref("project_task_1")})
-
  I check delegated task details.
-
  !python {model: project.task}: |
    task = self.browse(cr, uid, ref("project_task_1"), context=context)
    assert task.planned_hours == 2.0, "Planning hours is not correct after delegated."
    assert task.state == "pending", "Task should be in Pending after delegated."
-
  I re-open the task.
-
  !python {model: project.task}: |
    self.do_reopen(cr, uid, [ref("project_task_1")])
-
  I check reopened task details.
-
  !assert {model: project.task, id: project_task_1, severity: error, string: task should be open.}:
    - state == "open"
-
  I change the stage of task to next stage.
-
  !python {model: project.task}: |
    self.stage_next(cr, uid, [ref("project_task_1")])
-
  !record {model: project.task.reevaluate, id: reevaluate_id}:
    remaining_hours : 120
-
  I reevaluate task with remaining hours.
-
  !python {model: project.task.reevaluate}: |
    self.compute_hours(cr, uid, [ref("reevaluate_id")], {"active_id": ref("project_task_1")})
-
  I check remaining hours after reevaluated task.
-
  !assert {model: project.task, id: project_task_1, severity: error, string: task should be reevaluated}:
    - remaining_hours == 120.0
-
  I close the task.
-
  !python {model: project.task}: |
    self.action_close(cr, uid, [ref("project_task_1")])
-
  I check state after closed.
-
  !assert {model: project.task, id: project_task_1, severity: error, string: task is in open state}:
    - state == "done"
-
  I change the stage of task to previous stage.
-
  !python {model: project.task}: |
    self.stage_previous(cr, uid, [ref("project_task_1")])
-
  I cancel Task.
-
  !python {model: project.task}: |
    self.do_cancel(cr, uid, [ref("project_task_2")])
