[ADD]:added yml for task delegation process

bzr revid: pap@tinyerp.co.in-20100714055714-zvxircwar0gdajff
This commit is contained in:
pap (openerp)
2010-07-14 11:27:14 +05:30
parent ba0d8c7e7e
commit 4f66758480
@@ -0,0 +1,185 @@
-
This scenario tests the delegation process. Closing all the delegated tasks(task delegation at multiple levels) transits the parent task from pending to open state.
-
Creating a project OpenERP Documentaion
-
!record {model: project.project, id: project_project_openerpdocumentaion0}:
company_id: base.main_company
name: OpenERP Documentaion
-
Creating a task 'Develop book for Technical and Functional reference'
-
!record {model: project.task, id: project_task_documentation_book}:
name: Develop book for Technical and Functional reference
planned_hours: 20.0
project_id: project_project_openerpdocumentaion0
remaining_hours: 20.0
state: draft
-
Open the task
-
!python {model: project.task}: |
self.do_open(cr, uid, [ref("project_task_documentation_book")],
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
"tz": False, "active_id": ref("project.menu_action_view_task"), })
-
Creating a delegate task 'Prepare a book that gives functional overview of OpenERP'
-
!record {model: project.task, id: project_task_delegate_openerp_tutorial}:
name: Prepare a book that gives functional overview of OpenERP
planned_hours: 30.0
project_id: project.project_project_openerpdocumentaion0
remaining_hours: 30.0
state: draft
-
Open the task
-
!python {model: project.task}: |
self.do_open(cr, uid, [ref("project_task_delegate_openerp_tutorial")],
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
"tz": False, "active_id": ref("project.menu_action_view_task"), })
-
Creating a delegate task 'Prepare a technical reference for creating your modules'
-
!record {model: project.task, id: project_task_delegate_developer_book}:
name: Prepare a technical reference for creating your modules
planned_hours: 30.0
project_id: project_project_openerpdocumentaion0
remaining_hours: 30.0
state: draft
-
Open the task
-
!python {model: project.task}: |
self.do_open(cr, uid, [ref("project_task_delegate_developer_book")],
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
"tz": False, "active_id": ref("project.menu_action_view_task"), })
-
Delegate task 'Develop book for Technical and Functional reference' to these tasks and make it pending
-
!record {model: project.task, id: project_task_documentation_book}:
child_ids:
- project.project_task_delegate_openerp_tutorial
- project.project_task_delegate_developer_book
planned_hours: 20.0
state: pending
-
Creating a delegate task 'Prepare documentation for Module Development'
-
!record {model: project.task, id: project_task_delegate_module_develop}:
name: Prepare documentation for Module Development
planned_hours: 30.0
project_id: project.project_project_openerpdocumentaion0
remaining_hours: 30.0
state: draft
-
Creating a delegate 'Prepare documentation for Business Process Development'
-
!record {model: project.task, id: project_task_delegate_business_process_develop}:
name: Prepare documentation for Business Process Development
planned_hours: 30.0
project_id: project_project_openerpdocumentaion0
remaining_hours: 30.0
state: draft
-
Delegate task 'Prepare a technical reference for creating your modules' to these tasks and make it pending
-
!record {model: project.task, id: project_task_delegate_developer_book}:
child_ids:
- project.project_task_delegate_module_develop
- project.project_task_delegate_business_process_develop
planned_hours: 20.0
state: pending
-
Open the task
-
!python {model: project.task}: |
self.do_open(cr, uid, [ref("project_task_delegate_module_develop")],
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
"tz": False, "active_id": ref("project.menu_action_view_task"), })
-
Open the task
-
!python {model: project.task}: |
self.do_open(cr, uid, [ref("project_task_delegate_business_process_develop")],
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
"tz": False, "active_id": ref("project.menu_action_view_task"), })
-
Check if 'Prepare a technical reference for creating your modules' in pending state
-
!assert {model: project.task, id: project_task_delegate_developer_book, severity: error, string: Task is in pending state}:
- state == "pending"
-
Close the child task 'Prepare documentation for Module Development'
-
!python {model: project.task}: |
self.do_close(cr, uid, [ref("project_task_delegate_module_develop")], {"lang": "en_US",
"active_ids": [ref("project.menu_action_view_task")], "tz": False, "active_model":
"ir.ui.menu", "section_id": False, "search_default_project_id": False, "search_default_user_id":
1, "search_default_current": 1, "mail_send": False, "active_id": ref("project.menu_action_view_task"),
})
-
Close the child task 'Prepare documentation for Business Process Development'
-
!python {model: project.task}: |
self.do_close(cr, uid, [ref("project_task_delegate_business_process_develop")], {"lang": "en_US",
"active_ids": [ref("project.menu_action_view_task")], "tz": False, "active_model":
"ir.ui.menu", "section_id": False, "search_default_project_id": False, "search_default_user_id":
1, "search_default_current": 1, "mail_send": False, "active_id": ref("project.menu_action_view_task"),
})
-
Parent task 'Prepare a technical reference for creating your modules' task must now be in open state
-
!assert {model: project.task, id: project_task_delegate_developer_book, severity: error, string: Task is in done state}:
- state == "open"
-
Check if task 'Develop book for Technical and Functional reference' in pending state
-
!assert {model: project.task, id: project_task_documentation_book, severity: error, string: Task is in pending state}:
- state == "pending"
-
Close the child project 'Prepare a technical reference for creating your modules'
-
!python {model: project.task}: |
self.do_close(cr, uid, [ref("project_task_delegate_developer_book")], {"lang": "en_US",
"active_ids": [ref("project.menu_action_view_task")], "tz": False, "active_model":
"ir.ui.menu", "section_id": False, "search_default_project_id": False, "search_default_user_id":
1, "search_default_current": 1, "mail_send": False, "active_id": ref("project.menu_action_view_task"),
})
-
Close the child project 'Prepare a book that gives functional overview of OpenERP'
-
!python {model: project.task}: |
self.do_close(cr, uid, [ref("project_task_delegate_openerp_tutorial")], {"lang": "en_US",
"active_ids": [ref("project.menu_action_view_task")], "tz": False, "active_model":
"ir.ui.menu", "section_id": False, "search_default_project_id": False, "search_default_user_id":
1, "search_default_current": 1, "mail_send": False, "active_id": ref("project.menu_action_view_task"),
})
-
Parent task 'Develop book for Technical and Functional reference' must be now in open state
-
!assert {model: project.task, id: project_task_documentation_book, severity: error, string: Task is in done state}:
- state == "open"