scrum :Add the help,changed the icon,improve the demo data

bzr revid: sbh@tinyerp.com-20100607133142-slu7pbnz59wyox6y
This commit is contained in:
sbh (Open ERP) 2010-06-07 19:01:42 +05:30
parent 638b5b4577
commit d4190c056e
6 changed files with 57 additions and 55 deletions

View File

@ -51,8 +51,8 @@ class scrum_sprint(osv.osv):
tot = 0.0
prog = 0.0
for bl in sprint.backlog_ids:
tot += bl.planned_hours
prog += bl.planned_hours * bl.progress / 100.0
tot += bl.expected_hours
prog += bl.expected_hours * bl.progress / 100.0
res.setdefault(sprint.id, 0.0)
if tot>0:
res[sprint.id] = round(prog/tot*100)
@ -71,7 +71,7 @@ class scrum_sprint(osv.osv):
for sprint in self.browse(cr, uid, ids):
res.setdefault(sprint.id, 0.0)
for bl in sprint.backlog_ids:
res[sprint.id] += bl.planned_hours
res[sprint.id] += bl.expected_hours
return res
def _calc_expected(self, cr, uid, ids, name, args, context):
@ -79,7 +79,7 @@ class scrum_sprint(osv.osv):
for sprint in self.browse(cr, uid, ids):
res.setdefault(sprint.id, 0.0)
for bl in sprint.backlog_ids:
res[sprint.id] += bl.planned_hours
res[sprint.id] += bl.expected_hours
return res
def button_cancel(self, cr, uid, ids, context={}):
@ -108,14 +108,14 @@ class scrum_sprint(osv.osv):
'date_stop': fields.date('Ending Date', required=True),
'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)], help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
'product_owner_id': fields.many2one('res.users', 'Product Owner', required=True,help="The person who is responsible for the product"),
'scrum_master_id': fields.many2one('res.users', 'Scrum Manager', required=True),
'scrum_master_id': fields.many2one('res.users', 'Scrum Manager', required=True,help="The person who is maintains the processes for the product"),
'meeting_ids': fields.one2many('scrum.meeting', 'sprint_id', 'Daily Scrum'),
'review': fields.text('Sprint Review'),
'retrospective': fields.text('Sprint Retrospective'),
'backlog_ids': fields.one2many('scrum.product.backlog', 'sprint_id', 'Sprint Backlog'),
'progress': fields.function(_calc_progress, method=True, string='Progress (0-100)', help="Computed as: Time Spent / Total Time."),
'effective_hours': fields.function(_calc_effective, method=True, string='Effective hours', help="Computed using the sum of the task work done."),
'planned_hours': fields.function(_calc_expected, method=True, string='Planned Hours', help='Estimated time to do the task.'),
'expected_hours': fields.function(_calc_expected, method=True, string='Planned Hours', help='Estimated time to do the task.'),
'state': fields.selection([('draft','Draft'),('open','Open'),('pending','Pending'),('cancel','Cancelled'),('done','Done')], 'State', required=True),
}
_defaults = {
@ -225,7 +225,7 @@ class scrum_product_backlog(osv.osv):
tasks_id.append(task.id)
clone_id = self.copy(cr, uid, product.id, {
'name': 'PARTIAL '+ product.name ,
'name': 'PARTIAL:'+ product.name ,
'sprint_id':False,
'tasks_id':[(6, 0, tasks_id)],
})
@ -244,9 +244,9 @@ class scrum_product_backlog(osv.osv):
'state': fields.selection([('draft','Draft'),('open','Open'),('pending','Pending'),('done','Done'),('cancel','Cancelled')], 'State', required=True),
'progress': fields.function(_calc_progress, method=True, string='Progress', help="Computed as: Time Spent / Total Time."),
'effective_hours': fields.function(_calc_effective, method=True, string='Effective hours', help="Computed using the sum of the task work done (Time spent on tasks)"),
'planned_hours': fields.float('Planned Hours', help='Estimated total time to do the Backlog'),
'expected_hours': fields.float('Planned Hours', help='Estimated total time to do the Backlog'),
'create_date': fields.datetime("Creation Date", readonly=True),
'task_hours':fields.function(_calc_task, method=True, string='Total Task Hours', help='Estimated time of the total hours of the tasks')
'task_hours':fields.function(_calc_task, method=True, string='Task Hours', help='Estimated time of the total hours of the tasks')
}
_defaults = {
'state': 'draft',
@ -305,40 +305,39 @@ class scrum_meeting(osv.osv):
}
def button_send_to_master(self, cr, uid, ids, context={}):
body = ""
meeting_id=self.browse(cr,uid,ids)[0]
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
email=meeting_id and meeting_id.sprint_id.scrum_master_id.user_email
body = ""
if email:
self.email_send(cr,uid,ids,email)
else:
raise osv.except_osv(_('Warining !'), _('%s User no Email Address!' % meeting_id.sprint_id.scrum_master_id.name))
raise osv.except_osv(_('Error !'), _('%s No Email Address!' % meeting_id.sprint_id.scrum_master_id.name))
return True
def button_send_product_owner(self, cr, uid, ids, context={}):
meeting_id=self.browse(cr,uid,ids)[0]
email=meeting_id.sprint_id.product_owner_id.user_email
if email:
self.email_send(cr,uid,ids,email)
else:
raise osv.except_osv(_('Warining !'), _('%s User no Email Address!' % meeting_id.sprint_id.scrum_master_id.name))
raise osv.except_osv(_('Error !'), _('%s No Email Address!' % meeting_id.sprint_id.product_owner_id.name))
return True
def email_send(self, cr, uid, ids,email, context={}):
body=""
flag=False
email_from=tools.config.get('email_from', False)
meeting_id=self.browse(cr,uid,ids)[0]
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
user_email= email_from or user.address_id.email or email_from
body=""
body+="Hello " + meeting_id.sprint_id.scrum_master_id.name+",\n" +" \n Daily Meeting Details of date %s for the Sprint %s " % (meeting_id.date, meeting_id.sprint_id.name)
body += '\n\nDate :%s' % (meeting_id.date) + '\n\nTasks since yesterday \n\n:%s' % (meeting_id.question_yesterday) + '\n\n Task for Today :\n\n%s' % (meeting_id.question_today )+ '\n\n Blocks encountered \n :%s' % (meeting_id.question_blocks or 'No Blocks')
body+="Hello " + meeting_id.sprint_id.scrum_master_id.name+",\n" +" \nDaily Meeting Details of date %s for the Sprint %s \n" % (meeting_id.date, meeting_id.sprint_id.name)
body += '\nTasks since yesterday: \n%s' % (meeting_id.question_yesterday) + '\nTask for Today :\n %s\n' % (meeting_id.question_today )+ '\nBlocks encountered: \n %s' % (meeting_id.question_blocks or 'No Blocks')
body+="'\n\nThanks\n"+ user.name
sub_name=meeting_id.name or 'Scrum Meeting of %s '%meeting_id.date
tools.email_send(user_email , [email],sub_name, body, reply_to=None,openobject_id = str(meeting_id.id))
flag=tools.email_send(user_email , [email],sub_name, body, reply_to=None,openobject_id = str(meeting_id.id))
if flag==False:
raise osv.except_osv(_('Error !'), _(' Email Not send to %s!' % meeting_id.sprint_id.product_owner_id.name))
return True
scrum_meeting()

View File

@ -8,7 +8,7 @@
<!-- FIXME !!! -->
<field name="tasks">[24, 25, 28, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 36, 38]</field>
<field model="res.users" name="manager" search="[('login','=','demo')]"/>
<field name="planned_hours">156.0</field>
<field name="expected_hours">156.0</field>
<field name="name">Open ERP - dev branch</field>
<field model="res.users" name="product_owner_id" search="[('login','=','demo')]"/>
</record>
@ -29,7 +29,7 @@
<record id="scrum_product_backlog_0" model="scrum.product.backlog">
<field name="priority">3</field>
<field name="name">Automatic migration system</field>
<field name="planned_hours">6.0</field>
<field name="expected_hours">6.0</field>
<field name="note">This new system will enable you to migrate automatically from an old version of Open ERP to a new one. This system will migrate not only the Open ERP 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 Open ERP components. </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">done</field>
@ -38,7 +38,7 @@
<record id="scrum_product_backlog_1" model="scrum.product.backlog">
<field name="priority">3</field>
<field name="name">New accounting module</field>
<field name="planned_hours">111.0</field>
<field name="expected_hours">111.0</field>
<field name="note">The accounting module of Open ERP (financial accounting and management accounting) is being reshaped. New functionnalities will be added: intangible assets, a new way of presenting ledgers and bookings, new stock valuation calculation, and lots of predefined reports. </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">open</field>
@ -47,7 +47,7 @@
<record id="scrum_product_backlog_2" model="scrum.product.backlog">
<field name="priority">3</field>
<field name="name">Automated Plugin System to install/uninstall modules</field>
<field name="planned_hours">4.0</field>
<field name="expected_hours">4.0</field>
<field name="note">We have to develop a plug-in system which will enable to install/remove modules. The basic version of Open ERP will include only the required minimum, and you will select the modules thanks to the plug-in manager. This allows you to limit your system to your real needs: quality management, localisations, project and service management, marketing campaigns, and so on... </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">open</field>
@ -55,36 +55,36 @@
</record>
<record id="scrum_product_backlog_3" model="scrum.product.backlog">
<field name="name">Review all terms</field>
<field name="planned_hours">8.0</field>
<field name="expected_hours">8.0</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">done</field>
<field name="project_id" ref="scrum_project_1"/>
</record>
<record id="scrum_product_backlog_4" model="scrum.product.backlog">
<field name="name">Bugfixes</field>
<field name="planned_hours">6.0</field>
<field name="expected_hours">6.0</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">open</field>
<field name="project_id" ref="scrum_project_1"/>
</record>
<record id="scrum_product_backlog_5" model="scrum.product.backlog">
<field name="name">Test for 3.2.0 Publishing</field>
<field name="planned_hours">5.0</field>
<field name="expected_hours">5.0</field>
<field name="note">Test Open ERP to release stable 3.2.0 version. (may be 3.2.0-pre1 ?)</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
</record>
<record id="scrum_product_backlog_6" model="scrum.product.backlog">
<field name="name">Reshape the complete menu</field>
<field name="planned_hours">4.0</field>
<field name="note">Restrucutre the Open ERP menu to be more like others ERP.</field>
<field name="expected_hours">4.0</field>
<field name="note">Restructure the Open ERP menu to be more like others ERP.</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">open</field>
<field name="project_id" ref="scrum_project_1"/>
</record>
<record id="scrum_product_backlog_7" model="scrum.product.backlog">
<field name="name">Editable Trees</field>
<field name="planned_hours">12.0</field>
<field name="expected_hours">12.0</field>
<field name="note">Editable trees in list and one2many_list widgets.</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
@ -98,7 +98,7 @@
<field name="project_id" ref="scrum_project_1"/>
<field name="name">Review all English Terms</field>
<field name="state">done</field>
<field eval="time.strftime('%Y-%m-%d 12:12')" name="date_close"/>
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
<field name="product_backlog_id" ref="scrum_product_backlog_3"/>
</record>
<record id="scrum_task_4" model="project.task">
@ -107,7 +107,7 @@
<field name="project_id" ref="scrum_project_1"/>
<field name="name">Review all french terms</field>
<field name="state">done</field>
<field eval="time.strftime('%Y-%m-%d 12:12')" name="date_close"/>
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
<field name="product_backlog_id" ref="scrum_product_backlog_3"/>
</record>
<record id="scrum_task_5" model="project.task">
@ -116,7 +116,7 @@
<field name="project_id" ref="scrum_project_1"/>
<field name="name">Analytic Accounting features</field>
<field name="state">done</field>
<field eval="time.strftime('%Y-%m-%d 12:12')" name="date_close"/>
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
</record>
<record id="scrum_task_6" model="project.task">
@ -173,7 +173,7 @@
<field name="project_id" ref="scrum_project_1"/>
<field name="name">Bugfix - memory leak</field>
<field name="state">done</field>
<field eval="time.strftime('%Y-%m-%d 12:12')" name="date_close"/>
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
<field name="product_backlog_id" ref="scrum_product_backlog_4"/>
</record>
<record id="scrum_task_13" model="project.task">
@ -219,14 +219,17 @@
</record>
<record id="scrum_meeting_0" model="scrum.meeting">
<field name="question_yesterday">
@MRA: review work of team member check backlogs account reconcile process
@PSI: Account Modules YAML case => running
Admin: Worked on the Automatic migration system
Demo: Worked on the Test 3.2.0 before releasing
</field>
<field name="question_today">
@MRA: review and check work of team
@PSI: Account Modules YAML case == continue</field>
Admin:Work on Restructure the Open ERP menu to be more like others ERP.
Demo: Work on Editable trees</field>
<field name="question_blocks">
Demo :Bugfix - memory leak
</field>
<field name="sprint_id" ref="scrum.scrum_sprint_0"/>
<field name="date">2010-06-02</field>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
</record>
<record id="project_task_work_scrum_task1" model="project.task.work">
<field name="user_id" ref="base.user_root"/>
@ -234,7 +237,7 @@
<field name="task_id" ref="scrum_task_6"/>
<field name="company_id" ref="base.main_company"/>
<field eval="1.0" name="hours"/>
<field name="date">2010-06-02 14:09:49</field>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
</record>
<record id="project_task_work_scrum_task2" model="project.task.work">
<field name="user_id" ref="base.user_root"/>
@ -242,7 +245,7 @@
<field name="task_id" ref="scrum_task_6"/>
<field name="company_id" ref="base.main_company"/>
<field eval="5.0" name="hours"/>
<field name="date">2010-06-02 14:13:13</field>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
</record>
<record id="project_task_work_scrum_task2" model="project.task.work">
@ -251,7 +254,7 @@
<field name="task_id" ref="scrum_task_6"/>
<field name="company_id" ref="base.main_company"/>
<field eval="5.0" name="hours"/>
<field name="date">2010-06-02 14:13:13</field>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
</record>
<record id="project_task_work_scrum_task1" model="project.task.work">
<field name="user_id" ref="base.user_root"/>
@ -259,7 +262,7 @@
<field name="task_id" ref="scrum_task_17"/>
<field name="company_id" ref="base.main_company"/>
<field eval="10.0" name="hours"/>
<field name="date">2010-06-02 14:13:13</field>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
</record>
</data>

View File

@ -40,7 +40,7 @@
<field name="sprint_id"/>
<field name="user_id"/>
<field name="progress" widget="progressbar"/>
<field name="planned_hours" sum="Planned hours" widget="float_time"/>
<field name="expected_hours" sum="Planned hours" widget="float_time"/>
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
@ -57,12 +57,12 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Product backlog">
<group colspan="4" col="7">
<group colspan="4" col="8">
<field name="name" select="1"/>
<field name="project_id" select="1"/>
<field domain="[('project_id','=',project_id), ('state','in', ['draft','open'])]" name="sprint_id" select="1"/>
<button name="button_postpone" string="Post Pone" type="object"
help="Post Pone backlog"
help="Post Pone backlog" colspan="2"
icon="gtk-convert" attrs="{'invisible':[('state','=','done')]}"/>
<field name="user_id" select="1"/>
<field name="sequence" groups="base.group_extended"/>
@ -72,7 +72,7 @@
<notebook colspan="4">
<page string="Information">
<group colspan="6" col="8">
<field name="planned_hours" widget="float_time"/>
<field name="expected_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
<field name="task_hours" widget="float_time"/>
</group>
@ -196,7 +196,7 @@
<field name="date_start"/>
<field name="progress" widget="progressbar"/>
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
<field name="planned_hours" sum="Planned hours" widget="float_time"/>
<field name="expected_hours" sum="Planned hours" widget="float_time"/>
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
@ -229,7 +229,7 @@
</group>
<group colspan="2" col="2">
<separator string="Planning" colspan="2"/>
<field name="planned_hours" widget="float_time"/>
<field name="expected_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
<field name="progress" widget="progressbar"/>
</group>

View File

@ -47,8 +47,8 @@ class backlog_create_task(osv.osv_memory):
'description': backlog.note,
'project_id': backlog.project_id.id,
'user_id': data['user_id'] or False,
'planned_hours': backlog.planned_hours,
'remaining_hours':backlog.planned_hours,
'planned_hours': backlog.expected_hours,
'remaining_hours':backlog.expected_hours,
'sequence':backlog.sequence,
}))

View File

@ -84,14 +84,14 @@ class scrum_backlog_merge(osv.osv_memory):
new_note += backlogs.name
new_description += (backlogs.name or '') + '\n' + (backlogs.note or '')
new_exp_hour.append(backlogs.planned_hours)
new_exp_hour.append(backlogs.expected_hours)
for line in backlogs.tasks_id:
task_lines.append(line.id)
id_b = backlog_obj.create(cr, uid, {
'name': new_note,
'note': new_description,
'project_id': new_project_id,
'planned_hours': round(max(new_exp_hour))
'expected_hours': round(max(new_exp_hour))
}, context=context)
#To assing a new product backlog to merged tasks

View File

@ -49,8 +49,8 @@ class backlog_sprint_assign(osv.osv_memory):
'description': backlog.note,
'project_id': backlog.project_id.id,
'user_id': False,
'planned_hours':backlog.planned_hours,
'remaining_hours':backlog.planned_hours,
'planned_hours':backlog.expected_hours,
'remaining_hours':backlog.expected_hours,
})
if data['state_open'] and backlog.state == "draft":
backlog_obj.write(cr, uid, backlog.id, {'state':'open'})