[IMP] scrum: Improve scrum
bzr revid: psi@tinyerp.co.in-20100416133426-gyt5e2s4tv1jrpge
This commit is contained in:
parent
8896febf11
commit
64ccd959bb
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -75,7 +75,7 @@ class scrum_sprint(osv.osv):
|
|||
res.setdefault(sprint.id, 0.0)
|
||||
for bl in sprint.backlog_ids:
|
||||
res[sprint.id] += bl.expected_hours
|
||||
return res
|
||||
return res
|
||||
def button_cancel(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'cancel'}, context=context)
|
||||
return True
|
||||
|
@ -120,7 +120,7 @@ class scrum_sprint(osv.osv):
|
|||
v['scrum_master_id']= proj.user_id and proj.user_id.id or False
|
||||
v['date_stop'] = (DateTime.now() + DateTime.RelativeDateTime(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
|
||||
return {'value':v}
|
||||
|
||||
|
||||
scrum_sprint()
|
||||
|
||||
class scrum_product_backlog(osv.osv):
|
||||
|
@ -167,6 +167,8 @@ class scrum_product_backlog(osv.osv):
|
|||
|
||||
def button_cancel(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'cancel'}, context=context)
|
||||
for backlog in self.browse(cr, uid, ids, context=context):
|
||||
self.pool.get('project.task').write(cr, uid, [i.id for i in backlog.tasks_id], {'state': 'cancelled'})
|
||||
return True
|
||||
def button_draft(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'draft'}, context=context)
|
||||
|
@ -195,10 +197,12 @@ class scrum_product_backlog(osv.osv):
|
|||
'effective_hours': fields.function(_calc_effective, method=True, string='Effective hours'),
|
||||
'planned_hours': fields.function(_calc_planned, method=True, string='Planned Hours'),
|
||||
'expected_hours': fields.float('Expected Hours'),
|
||||
'date':fields.datetime("Created Date"),
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
'active': lambda *a: 1
|
||||
'active': lambda *a: 1,
|
||||
'user_id': lambda self,cr,uid,context: uid,
|
||||
}
|
||||
_order = "sequence"
|
||||
scrum_product_backlog()
|
||||
|
@ -234,10 +238,12 @@ class scrum_meeting(osv.osv):
|
|||
'name' : fields.char('Meeting Name', size=64, required=True),
|
||||
'date': fields.date('Meeting Date', required=True),
|
||||
'sprint_id': fields.many2one('scrum.sprint', 'Sprint', required=True),
|
||||
'project_id': fields.many2one('project.project', 'Project'),
|
||||
'question_yesterday': fields.text('Tasks since yesterday'),
|
||||
'question_today': fields.text('Tasks for today'),
|
||||
'question_blocks': fields.text('Blocks encountered'),
|
||||
'question_backlog': fields.text('Backlog Accurate'),
|
||||
'task_ids': fields.many2many('project.task', 'meeting_task_rel', 'metting_id', 'task_id', 'Tasks')
|
||||
}
|
||||
#
|
||||
# TODO: Find the right sprint thanks to users and date
|
||||
|
|
|
@ -45,10 +45,11 @@
|
|||
<field name="expected_hours" sum="Expected hours" widget="float_time"/>
|
||||
<field name="state"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
|
||||
<button type="action" string="Convert to Task" name="%(wizard_scrum_backlog_task)d" states="draft,pending" icon="gtk-execute"/>
|
||||
<button type="action" string="Convert to Task" name="%(wizard_scrum_backlog_task)d" states="pending" icon="gtk-execute"/>
|
||||
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
|
||||
<button type="object" string="Close" name="button_close" states="open,pending" icon="gtk-jump-to"/>
|
||||
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
|
||||
<button type="object" string="Cancel" name="button_cancel" states="open,pending" icon="gtk-convert"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -65,6 +66,7 @@
|
|||
<field domain="[('project_id','=',project_id)]" name="sprint_id" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<field name="date"/>
|
||||
<field name="active" select="1"/>
|
||||
<group colspan="6" col="8">
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
|
@ -81,13 +83,14 @@
|
|||
<field colspan="4" name="tasks_id" nolabel="1" widget="one2many_list" context="{'default_project_id':project_id, 'default_sprint_id':sprint_id, 'default_product_backlog_id':active_id}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="7" colspan="4">
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="1" readonly="1"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
|
||||
<button type="action" string="Convert to Task" name="%(wizard_scrum_backlog_task)d" states="draft,pending" icon="gtk-execute"/>
|
||||
<button type="action" string="Convert to Task" name="%(wizard_scrum_backlog_task)d" states="pending" icon="gtk-execute"/>
|
||||
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
|
||||
<button type="object" string="Close" name="button_close" states="open,pending" icon="gtk-jump-to"/>
|
||||
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
|
||||
<button type="object" string="Cancel" name="button_cancel" states="open,pending" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -110,10 +113,17 @@
|
|||
<filter icon="terp-project" string="Open" domain="[('state','=','open')]" help="Open Backlogs"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="project_id"
|
||||
widget="selection"
|
||||
/>
|
||||
<field name="sprint_id"/>
|
||||
<field name="project_id" widget="selection"/>
|
||||
<field name="sprint_id" widget="selection">
|
||||
<filter icon="terp-project"
|
||||
string="Sprints"
|
||||
domain="[('sprint_id.state','=','open')]"
|
||||
help="Backlogs Assigned To Current Sprints"/>
|
||||
<filter icon="terp-project"
|
||||
string="Sprints"
|
||||
domain="[('sprint_id','=',False)]"
|
||||
help="Backlogs Not Assigned To Sprints."/>
|
||||
</field>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter name="my_features"
|
||||
icon="terp-project"
|
||||
|
@ -308,6 +318,10 @@
|
|||
<separator colspan="4" string="Are your Sprint Backlog estimate accurate ?"/>
|
||||
<field colspan="4" name="question_backlog" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Links">
|
||||
<separator colspan="4" string="Tasks"/>
|
||||
<field colspan="4" name="task_ids" nolabel="1" domain="[('sprint_id','=',sprint_id)]"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -320,12 +334,13 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Scrum Sprint">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-project" string="Daily" domain="[('date','=',time.strftime(%%Y-%%m-%%d))]" help="Daily Meetings"/>
|
||||
<filter icon="terp-project" string="Daily" domain="[('date','=',time.strftime('%%Y%%m%%d'))]" help="Daily Meetings"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="sprint_id">
|
||||
<filter icon="terp-project" name="current" string="Current" domain="[('sprint_id.state','in',('draft','open'))]" help="Current Sprints"/>
|
||||
</field>
|
||||
<field name="project_id" widget="selection"/>
|
||||
<field name="date"/>
|
||||
</group>
|
||||
<newline/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<wizard id="wizard_scrum_backlog_task" model="scrum.product.backlog" name="scrum.product.backlog.task.create" string="Created tasks"/>
|
||||
<wizard id="wizard_scrum_backlog_task" model="scrum.product.backlog" name="scrum.product.backlog.task.create" string="Create Tasks"/>
|
||||
<wizard id="wizard_scrum_backlog_sprint" model="scrum.product.backlog" name="scrum.product.backlog.sprint.assign" string="Assign Sprint"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -41,8 +41,8 @@ bts_form = """<?xml version="1.0" ?>
|
|||
|
||||
bts_fields = {
|
||||
'sprint_id' : {'string':'Sprint Name', 'type':'many2one', 'relation':'scrum.sprint', 'required':True},
|
||||
'state_open' : {'string':'Set Open', 'type':'boolean'},
|
||||
'convert_to_task' : {'string':'Convert To Task', 'type':'boolean'}
|
||||
'state_open' : {'string':'Set Open', 'type':'boolean', 'default': lambda *a: True},
|
||||
'convert_to_task' : {'string':'Convert To Task', 'type':'boolean', 'default': lambda *a: True}
|
||||
}
|
||||
|
||||
def _assign_sprint(self, cr, uid, data, context):
|
||||
|
|
|
@ -51,6 +51,7 @@ def _do_create(self, cr, uid, data, context={}):
|
|||
'user_id': data['form']['user_id'] or False,
|
||||
'planned_hours': backlog.planned_hours,
|
||||
'remaining_hours':backlog.expected_hours,
|
||||
'sequence':backlog.sequence,
|
||||
}))
|
||||
value = {
|
||||
'domain': "[('product_backlog_id','in',["+','.join(map(str,data['ids']))+"])]",
|
||||
|
|
Loading…
Reference in New Issue