[MERGE] project: improve yml tests (rd-v61-clean-test)

bzr revid: rco@openerp.com-20111213094926-fytvhf5ezu1qnsx7
This commit is contained in:
Raphael Collet 2011-12-13 10:49:26 +01:00
commit 8e29733b5f
7 changed files with 164 additions and 530 deletions

View File

@ -62,8 +62,9 @@ Dashboard for project members that includes:
'project_demo.xml',
],
'test':[
'test/test_project.yml',
'test/test_project_delegation.yml',
'test/project_demo.yml',
'test/project_process.yml',
'test/task_process.yml',
],
'installable': True,
'active': False,

View File

@ -114,6 +114,7 @@ class project(osv.osv):
if task.project_id: result[task.project_id.id] = True
return result.keys()
#dead code
def _get_project_work(self, cr, uid, ids, context=None):
result = {}
for work in self.pool.get('project.task.work').browse(cr, uid, ids, context=context):
@ -360,7 +361,7 @@ def Project():
working_days = %s
resource = %s
""" % (
project.id,
project.id,
project.date_start, working_days,
'|'.join(['User_'+str(x) for x in puids])
)
@ -1100,7 +1101,7 @@ class account_analytic_account(osv.osv):
if vals.get('child_ids', False) and context.get('analytic_project_copy', False):
vals['child_ids'] = []
return super(account_analytic_account, self).create(cr, uid, vals, context=context)
def unlink(self, cr, uid, ids, *args, **kwargs):
project_obj = self.pool.get('project.project')
analytic_ids = project_obj.search(cr, uid, [('analytic_account_id','in',ids)])

View File

@ -0,0 +1,12 @@
-
!record {model: project.project, id: project_integrate_openerp, view: False}:
partner_id: base.res_partner_agrolait
-
!record {model: project.task, id: project_task_1, view: False}:
remaining_hours: 10.00
-
!record {model: project.task, id: project_task_1, view: False}:
planned_hours: 10.00
-
!record {model: project.task, id: project_task_1, view: False}:
project_id: project_integrate_openerp

View File

@ -0,0 +1,70 @@
-
In order to Test Process of Project Management,
-
I create duplicate template.
-
!python {model: project.project}: |
new_template = self.duplicate_template(cr, uid, [ref("project_integrate_openerp")])
assert new_template, "duplicate template is not created"
template = self.browse(cr, uid, new_template['res_id'], context=context)
assert template.state == 'open', "Duplicate template must be in open state."
-
I convert template into real Project.
-
!python {model: project.project}: |
self.reset_project(cr, uid, [ref("project_integrate_openerp")])
-
I check project details after convert from template.
-
!assert {model: project.project, id: project_integrate_openerp, severity: error, string: Project should be active}:
- state == "open"
-
I put project in pending.
-
!python {model: project.project}: |
self.set_pending(cr, uid, [ref("project_integrate_openerp")])
-
I check state after put in pending.
-
!assert {model: project.project, id: project_integrate_openerp, severity: error, string: Project should be in pending state}:
- state == "pending"
-
I re-open the project.
-
!python {model: project.project}: |
self.set_open(cr, uid, [ref("project_integrate_openerp")])
-
I check state after reopen.
-
!assert {model: project.project, id: project_integrate_openerp, severity: error, string: Project should be open.}:
- state == "open"
-
I close the project.
-
!python {model: project.project}: |
self.set_done(cr, uid, [ref("project_integrate_openerp")])
-
I check state after closed.
-
!assert {model: project.project, id: project_integrate_openerp, severity: error, string: Project should be close.}:
- state == "close"
-
I set project into template.
-
!python {model: project.project}: |
self.set_template(cr, uid, [ref("project_integrate_openerp")])
-
I schedule tasks of project.
-
!python {model: project.project}: |
self.schedule_tasks(cr, uid, [ref("project_integrate_openerp")], context=context)
-
I copy the tasks of project.
-
!python {model: project.project}: |
self.template_copy(cr, uid, ref("project_integrate_openerp"))
-
I cancel Project.
-
!python {model: project.project}: |
self.set_cancel(cr, uid, [ref("project_project_9")])

View File

@ -0,0 +1,76 @@
-
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: res_users_analyst
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.next_type(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.prev_type(cr, uid, [ref("project_task_1")])
-
I cancel Task.
-
!python {model: project.task}: |
self.do_cancel(cr, uid, [ref("project_task_2")])

View File

@ -1,296 +0,0 @@
-
Test project template feature
-
Create project 'OpenERP Training Programme'
-
!record {model: project.project, id: project_project_openerptrainingprogramme0}:
company_id: base.main_company
name: OpenERP Training Programme
-
Create task 'Technical Training' for this project
-
!record {model: project.task, id: project_task_technicaltraining0}:
date_start: !eval time.strftime('%Y-%m-%d %H:%M:%S')
name: Technical Training
planned_hours: 30.0
project_id: project_project_openerptrainingprogramme0
remaining_hours: 30.0
state: draft
-
Create task 'Functional Training' for this project
-
!record {model: project.task, id: project_task_functionaltraining0}:
date_start: !eval time.strftime('%Y-%m-%d %H:%M:%S')
name: Functional Training
planned_hours: 30.0
project_id: project_project_openerptrainingprogramme0
remaining_hours: 30.0
state: draft
-
Set project as project template
-
!python {model: project.project}: |
self.set_template(cr, uid, [ref("project_project_openerptrainingprogramme0")],
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_open_view_project_all")],
"tz": False, "active_id": ref("project.menu_open_view_project_all"), })
-
Check if project in template state
-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: Project is in template state}:
- state == "template"
-
Create new project based on this template
-
!python {model: project.project}: |
new_prj = self.duplicate_template(cr, uid, [ref("project_project_openerptrainingprogramme0")],
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_open_view_project_all")],
"tz": False, "active_id": ref("project.menu_open_view_project_all"), })
if not new_prj:
raise Exception( "New project based on template not created")
new_id = new_prj['res_id']
new_prj = self.read(cr, uid, [new_id], ['name', 'state'])[0]
state = new_prj['state']
name = new_prj['name']
assert state == 'open', "Project in %s state. Project created from template project must be in open state"%state
-
Reset project template to normal project
-
!python {model: project.project}: |
self.reset_project(cr, uid, [ref("project_project_openerptrainingprogramme0")], {"lang": "en_US", "active_ids":
[ref("project.menu_open_view_project_all")], "tz": False, "active_model":
"ir.ui.menu", "project_id": False, "active_id": ref("project.menu_open_view_project_all"),
})
-
Check if project in open state
-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: Project is in open state}:
- state == "open"
-
Test for different project-states
-
Keep project pending
-
!python {model: project.project}: |
self.set_pending(cr, uid, [ref("project_project_openerptrainingprogramme0")], {"lang": "en_US", "active_ids":
[ref("project.menu_open_view_project_all")], "tz": False, "active_model":
"ir.ui.menu", "project_id": False, "active_id": ref("project.menu_open_view_project_all"),
})
-
Check if project in pending state
-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: Project is in pending state}:
- state == "pending"
-
Cancel the project
-
!python {model: project.project}: |
self.set_cancel(cr, uid, [ref("project_project_openerptrainingprogramme0")], {"lang": "en_US", "active_ids":
[ref("project.menu_open_view_project_all")], "tz": False, "active_model":
"ir.ui.menu", "project_id": False, "active_id": ref("project.menu_open_view_project_all"),
})
-
Check if project in cancel state
-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: Project is in cancel state}:
- state == "cancelled"
-
Re-open the project
-
!python {model: project.project}: |
self.set_open(cr, uid, [ref("project_project_openerptrainingprogramme0")], {"lang": "en_US", "active_ids": [ref("project.menu_open_view_project_all")],
"tz": False, "active_model": "ir.ui.menu", "project_id": False, "active_id":
ref("project.menu_open_view_project_all"), })
-
Check if project in open state
-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: Project is in open state}:
- state == "open"
-
Test for task work allocation
-
As i cancelled my project before, i check if the task 'Technical Training' is in cancelled state
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: Task is in cancelled state}:
- state == "cancelled"
-
Now in order to reactivate the task 'Technical Training', i click on the "Reactivate" button and fill the remaining hour field
-
!record {model: project.task.reevaluate, id: project_task_technicaltraining_remainingwiz0}:
remaining_hours: 30.0
- |
I click the apply button
-
!python {model: project.task.reevaluate}: |
self.compute_hours(cr, uid, [ref('project_task_technicaltraining_remainingwiz0')], {'active_id': ref("project_task_technicaltraining0"),'button_reactivate': True})
- |
Check if task 'Technical Training' in open state and for other initial values
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: Project is in open state}:
- state == "open"
- planned_hours == 30
- remaining_hours == 30
- delay_hours == 0.0
- effective_hours == 0.0
-
Make a work task entry 'Training on OpenERP modules, models and classes' of 10 hours
-
!record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}:
work_ids:
- date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
hours: 10.0
name: Training on OpenERP modules, models and classes
user_id: base.user_root
-
Check for effective hours and remaining hours, effective_hours must be equal to 10
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: After work task of 10 hours effective_hours must be equal to 10}:
- remaining_hours == 20
- effective_hours == 10.0
-
Make a work task entry 'Training on OpenERP xml views' of 10 hours
-
!record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}:
work_ids:
- date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
hours: 10.0
name: Training on OpenERP xml views
user_id: base.user_root
-
Check for effective hours and remaining hours, effective_hours must be equal to 20
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: After one more work task of 10 hours effective_hours must be equal to 20}:
- remaining_hours == 10
- effective_hours == 20.0
-
Make a work task entry 'Training on workflows' of 10 hours
-
!record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}:
work_ids:
- date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
hours: 10.0
name: Training on workflows
user_id: base.user_root
-
Check for effective hours and remaining hours, effective_hours must be equal to 30
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: After one more work task of 10 hours effective_hours must be equal to 30}:
- remaining_hours == 0
- effective_hours == 30.0
-
Set remaining hours of 10 hours for reevaluating the task
-
!record {model: project.task.reevaluate, id: config_compute_remaining_0}:
remaining_hours: 10.0
-
Reevaluate the task
-
!python {model: project.task.reevaluate}: |
self.compute_hours(cr, uid, [ref("config_compute_remaining_0")], {"lang": "en_US",
"project_id": False, "tz": False, "active_model": "project.task", "search_default_project_id":
False, "search_default_user_id": 1, "search_default_current": 1, "active_ids":
[ref("project_task_technicaltraining0")], "active_id": ref("project_task_technicaltraining0"), })
-
Check for effective hours and remaining hours, remaining_hours must be 10 while planned_hours remains 30
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: After reevaluating the task with 10 hours remaining_hours must be 10 while planned_hours remains 30}:
- planned_hours == 30
- remaining_hours == 10.0
- effective_hours == 30.0
-
Make a work task entry 'Training on reports and wizards' of 10 hours
-
!record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}:
work_ids:
- date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
hours: 10.0
name: Training on reports and wizards
user_id: base.user_root
-
Check for effective hours and remaining hours
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: After one more work task of 10 hours effective_hours must be equal to 40 while planned_hours remains 30}:
- planned_hours == 30
- remaining_hours == 0
- effective_hours == 40.0
-
Close the task
-
!python {model: project.task}: |
self.do_close(cr, uid, [ref("project_task_technicaltraining0")], {'mail_send': False})
-
Check if task in done state
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: Task is in done state}:
- state == "done"
-
Test for task reactivation
-
Reactivate task
-
!record {model: project.task.reevaluate, id: config_compute_remaining_1}:
remaining_hours: 10.0
-
Reevaluate the task with 10 hours remaining
-
!python {model: project.task.reevaluate}: |
self.compute_hours(cr, uid, [ref("config_compute_remaining_1")], {"lang": "en_US",
"project_id": False, "tz": False, "button_reactivate": True, "active_model":
"project.task", "search_default_project_id": False, "search_default_user_id":
1, "search_default_current": 1, "active_ids": [ref("project_task_technicaltraining0")], "active_id": ref("project_task_technicaltraining0"),
})
-
Check for effective hours and remaining hours, remaining_hours must be 10 while planned_hours remains 30
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: After reevaluating the task with 10 hours remaining_hours must be 10 while planned_hours remains 30}:
- planned_hours == 30
- remaining_hours == 10.0
- effective_hours == 40.0
-
Make a work task entry 'Training on yml' of 5 hours
-
!record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}:
work_ids:
- date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
hours: 5.0
name: Training on yml
user_id: base.user_root
-
Check for effective hours and remaining hours, remaining_hours must be 5, effective_hours must be 45
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: After work task of 5 hours effective_hours must be equal to 45 and remaining_hours is 5}:
- planned_hours == 30
- remaining_hours == 5.0
- effective_hours == 45.0
-
Close the task
-
!python {model: project.task}: |
self.do_close(cr, uid, [ref("project_task_technicaltraining0")], {'mail_send': False})
-
Check if task in done state
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error}:
- state == "done"
-
Check for effective hours and remaining hours
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: After closing the task planned_hours must remain 30 effective_hours must be 45 and remaining hours must be 0}:
- planned_hours == 30
- remaining_hours == 0.0
- effective_hours == 45.0
-
Close project 'OpenERP Training Programme'
-
!python {model: project.project}: |
self.set_done(cr, uid, [ref("project_project_openerptrainingprogramme0")], {"lang": "en_US", "active_ids": [ref("project.menu_open_view_project_all")],
"tz": False, "active_model": "ir.ui.menu", "project_id": False, "active_id":
ref("project.menu_open_view_project_all"), })
-
Check if project in close state
-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: "Project must be in closed state"}:
- state == "close"

View File

@ -1,230 +0,0 @@
-
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 Documentation
-
!record {model: project.project, id: project_project_openerpdocumentation0}:
company_id: base.main_company
name: OpenERP Documentation
-
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_openerpdocumentation0
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 task 'Publish the References'
-
!record {model: project.task, id: project_task_publish_book}:
name: Publish the References
planned_hours: 10.0
project_id: project_project_openerpdocumentation0
remaining_hours: 10.0
state: draft
-
Open the task
-
!python {model: project.task}: |
self.do_open(cr, uid, [ref("project_task_publish_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"), })
-
Test the delegate wizard
-
Creating a delegate task 'Publish the References' of 15 hours, renaming parent task to 'CHECK Publish the References' of 1 hour
-
!record {model: project.task.delegate, id: project_task_publish_book_delegate}:
name: Publish the References
new_task_description: aaa
planned_hours: 15.0
planned_hours_me: 1.0
prefix: 'CHECK: Publish the References'
state: pending
user_id: base.user_demo
-
Validating the delegate task
-
!python {model: project.task.delegate}: |
self.delegate(cr, uid, [ref("project_task_publish_book_delegate")],
{"lang": "en_US", "active_model": "project.task", "tz": False, "record_id":
4, "active_ids": [ref("project_task_publish_book")], "active_id": ref("project_task_publish_book"),
})
-
Check if parent task 'CHECK Publish the References' is in pending state
-
!assert {model: project.task, id: project_task_publish_book, severity: error, string: "Task must be in pending state after delegation"}:
- state == "pending"
-
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_openerpdocumentation0
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_openerpdocumentation0
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_openerpdocumentation0
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_openerpdocumentation0
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 must be 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 task '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 task '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"