[IMP]project_issue: Improve test cases
bzr revid: dbr@tinyerp.com-20110831093139-kisy7psaz0zl0rt8
This commit is contained in:
parent
5cecf136d9
commit
8b125dd8dc
|
@ -20,17 +20,36 @@
|
|||
task_id: project_task_training0
|
||||
working_hours_close: 0.0
|
||||
working_hours_open: 0.0
|
||||
|
||||
-
|
||||
Check there is no task attached to project issue
|
||||
-
|
||||
!assert {model: project.issue, id: project_issue_onchangeevent0, string: There must not be any task attached to issue}:
|
||||
- task_id.id == False
|
||||
|
||||
-
|
||||
Compute the days.
|
||||
-
|
||||
!python {model: project.issue}: |
|
||||
import time
|
||||
args = {}
|
||||
fields = {
|
||||
'categ_id': ref('project_issue.bug_categ'),
|
||||
'date_open': time.strftime('%Y-%m-%d'),
|
||||
'name': 'on_change event does not pass context to the method',
|
||||
'project_id': ref('project.project_project_22'),
|
||||
'task_id': ref('project_task_training0'),
|
||||
'working_hours_close': 0.0,
|
||||
'working_hours_open': 0.0,
|
||||
'days_since_creation':''
|
||||
}
|
||||
self._compute_day(cr, uid, [ref('project_issue_onchangeevent0')], fields, args, context=None)
|
||||
-
|
||||
Convert project issue to task
|
||||
-
|
||||
!python {model: project.issue}: |
|
||||
try:
|
||||
self._get_issue_work(cr, uid, [ref('project_issue_onchangeevent0')], context=None)
|
||||
except:
|
||||
pass
|
||||
self.convert_issue_task(cr, uid, [ref("project_issue_onchangeevent0")],
|
||||
{"lang": "en_US", "project_id": False, "tz": False, "active_model": "ir.ui.menu",
|
||||
"department_id": False, "section_id": False, "search_default_project_id":
|
||||
|
@ -47,6 +66,7 @@
|
|||
Get project issue's task work
|
||||
-
|
||||
!python {model: project.issue}: |
|
||||
context.update({'project_id':ref('project.project_project_22')})
|
||||
self._get_project(cr, uid, context)
|
||||
-
|
||||
Creat some changes on project
|
||||
|
|
|
@ -3,12 +3,18 @@
|
|||
-
|
||||
!record {model: project.project, id: project.project_project_22}:
|
||||
project_escalation_id: project.project_project_21
|
||||
-
|
||||
Check escalate the project assign
|
||||
-
|
||||
!python {model: project.project}: |
|
||||
self._check_escalation(cr, uid, [ref('project.project_project_22')], context=None)
|
||||
-
|
||||
Create an issue for "Specific Developments" project
|
||||
-
|
||||
!record {model: project.issue, id: project_issue_stockmovedates0}:
|
||||
categ_id: project_issue.bug_categ
|
||||
name: Stock Move dates
|
||||
task_id: project_task_training0
|
||||
project_id: project.project_project_22
|
||||
working_hours_close: 0.0
|
||||
working_hours_open: 0.0
|
||||
|
|
Loading…
Reference in New Issue