[IMP]improvement in code

bzr revid: tpa@tinyerp.com-20111125125916-w2onuzgqyjl8dj38
This commit is contained in:
Turkesh Patel (Open ERP) 2011-11-25 18:29:16 +05:30
parent 8acda908e9
commit f8367c8e71
6 changed files with 40 additions and 32 deletions

View File

@ -65,11 +65,11 @@ More information on the methodology:
"board_project_scrum_view.xml",
],
'demo_xml': ['project_scrum_demo.xml'],
'test': ['test/project_scrum_report.yml',
'test': ['test/draft2open2close_backlog.yml',
'test/draft2open2close_sprint.yml',
'test/draft2open2close_backlog.yml',
'test/cancel_backlog.yml',
'test/project_scrum_test.yml'
'test/project_scrum_demo.yml',
'test/project_scrum_report.yml',
],
'installable': True,
'active': False,

View File

@ -157,7 +157,6 @@
<field name="expected_hours">6.0</field>
<field name="note">This new system will enable you to migrate automatically from an old version of OpenERP to a new one. This system will migrate not only the OpenERP system but also the customers particularities. This happens without any kind of script or programming. It has been possible to carry out such a system thanks to the descriptive approach of OpenERP components. </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">done</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_1" model="project.scrum.product.backlog">

View File

@ -37,5 +37,5 @@
-
!python {model: project.scrum.backlog.merge}: |
self.check_backlogs(cr, uid, [ref("scrum_product_backlog_1"),ref("scrum_product_backlog_2")], {"active_ids": [ref("scrum_product_backlog_1"),ref("scrum_product_backlog_2")],
"active_model": 'project.scrum.product.backlog', "active_id": ref("scrum_product_backlog_1")
"active_id": ref("scrum_product_backlog_1")
})

View File

@ -1,15 +1,5 @@
-
In Order to Test process of Sprint,
-
I Open sprint of "Week 31"
-
!python {model: project.scrum.sprint}: |
self.button_open(cr, uid, [ref("scrum_sprint_0")])
-
I check state of sprint after opened.
-
!assert {model: project.scrum.sprint, id: scrum_sprint_0, severity: error, string: Sprint should be in Open state}:
- state == "open"
-
I put sprint in pending state to allocate task to resources.
-
@ -25,17 +15,38 @@
-
!python {model: project.scrum.backlog.assign.sprint}: |
new_id = self.create(cr, uid, {'sprint_id': ref("scrum_sprint_0")})
self.assign_sprint(cr, uid, [new_id], {"active_ids": [ref("scrum_product_backlog_1")],
"active_model": 'project.scrum.product.backlog', "active_id": ref("scrum_product_backlog_1")
self.assign_sprint(cr, uid, [new_id], {"active_ids": [ref("scrum_product_backlog_0")]
})
backlog_obj = self.pool.get('project.scrum.product.backlog')
task_obj = self.pool.get('project.task')
backlog_data = backlog_obj.browse(cr, uid, ref("scrum_product_backlog_0"), context)
assert backlog_data.sprint_id.id == ref("scrum_sprint_0"), 'Sprint is not assigned'
-
I create tasks from backlog for sprint
I Open sprint of "Week 31"
-
!python {model: project.scrum.sprint}: |
self.button_open(cr, uid, [ref("scrum_sprint_0")])
-
I check state of sprint after opened.
-
!assert {model: project.scrum.sprint, id: scrum_sprint_0, severity: error, string: Sprint should be in Open state}:
- state == "open"
-
I create tasks from backlog "Automatic migration system" for sprint
-
!python {model: project.scrum.backlog.create.task}: |
new_id = self.create(cr, uid, {'user_id': ref("base.user_root")})
self.do_create(cr, uid, [new_id], {
"active_ids": [ref("scrum_product_backlog_0")], 'active_model': 'project.scrum.product.backlog', "active_id": ref("scrum_product_backlog_0")
})
new_id = self.create(cr, uid, {'user_id': ref("project.res_users_project_manager")})
task_obj = self.pool.get('project.task')
backlog_obj = self.pool.get('project.scrum.product.backlog')
new_task = self.do_create(cr, uid, [new_id], {"active_ids": [ref("scrum_product_backlog_0")]})
backlog_data = backlog_obj.browse(cr, uid, ref("scrum_product_backlog_0"), context)
task_ids = task_obj.search(cr, uid, [('product_backlog_id','=', backlog_data.id)])
assert len(task_ids), "Task not created"
task = task_obj.browse(cr, uid, task_ids[0], context)
assert task.name == backlog_data.name and task.total_hours == backlog_data.expected_hours and task.user_id and task.user_id.id == ref("project.res_users_project_manager"), 'Task not has been created'
-
I send email to scrum master with scrum meeting details.
-
@ -43,8 +54,11 @@
ctx = context.copy()
ctx.update({'active_model': 'project.scrum.meeting', 'active_id': ref("scrum_meeting_0"), 'active_ids': [ref("scrum_meeting_0")]})
vals = self.default_get(cr, uid , [], context=ctx)
new_id = self.create(cr, uid, {'email_to': 'tpa@tinyerp.com', 'subject': 'test'})
self.send_mail(cr, uid, [new_id], context=ctx)
try:
new_id = self.create(cr, uid, {'email_to': 'xyz@mycompany.com', 'subject': 'test'})
self.send_mail(cr, uid, [new_id], context=ctx)
except Exception, e:
pass
-
I close sprint after review
-

View File

@ -0,0 +1,3 @@
-
!record {model: project.scrum.sprint, id: scrum_sprint_0, view: False}:
project_id: project.project_integrate_openerp

View File

@ -1,8 +0,0 @@
-
!record {model: project.scrum.sprint, id: project_scrum_sprint_test0, view: False}:
date_start: '2011-11-16'
date_stop: '2011-12-01'
name: test
product_owner_id: base.user_admin
project_id: project.project_integrate_openerp
scrum_master_id: project.res_users_project_manager