[ADD]: project_scrum: added wizard on Postpone button of the Product Backlogs
bzr revid: jas@tinyerp.com-20101006061016-zns1izbah5uwqxzx
This commit is contained in:
parent
9cad752f27
commit
4388a5815b
|
@ -56,6 +56,7 @@
|
|||
'wizard/project_scrum_backlog_merger_view.xml',
|
||||
'project_scrum_view.xml',
|
||||
'wizard/project_scrum_backlog_sprint_view.xml',
|
||||
'wizard/project_scrum_postpone_view.xml',
|
||||
'process/project_scrum_process.xml',
|
||||
"board_project_scrum_view.xml",
|
||||
],
|
||||
|
|
|
@ -236,24 +236,6 @@ class project_scrum_product_backlog(osv.osv):
|
|||
self.write(cr, uid, ids, {'state':'pending'}, context=context)
|
||||
return True
|
||||
|
||||
def button_postpone(self, cr, uid, ids, context=None):
|
||||
raise osv.except_osv(_('Warning!'), _( "Are you sure to postpone Backlog ?"))
|
||||
if context is None:
|
||||
context = {}
|
||||
for product in self.browse(cr, uid, ids, context=context):
|
||||
tasks_id = []
|
||||
for task in product.tasks_id:
|
||||
if task.state != 'done':
|
||||
tasks_id.append(task.id)
|
||||
|
||||
clone_id = self.copy(cr, uid, product.id, {
|
||||
'name': 'PARTIAL:'+ product.name ,
|
||||
'sprint_id':False,
|
||||
'tasks_id':[(6, 0, tasks_id)],
|
||||
})
|
||||
self.write(cr, uid, ids, {'state':'cancel'}, context=context)
|
||||
return True
|
||||
|
||||
_columns = {
|
||||
'name' : fields.char('Feature', size=64, required=True),
|
||||
'note' : fields.text('Note'),
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<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="Postpone" type="object"
|
||||
<button name="%(action_postpone_wizard)d" string="Postpone" type="action"
|
||||
help="Postpone backlog" colspan="2"
|
||||
icon="gtk-convert" attrs="{'invisible':[('state','=','done')]}"/>
|
||||
<field name="user_id" select="1"/>
|
||||
|
@ -192,7 +192,7 @@
|
|||
<!--
|
||||
Scrum Sprint
|
||||
-->
|
||||
|
||||
|
||||
<record id="view_scrum_sprint_calendar" model="ir.ui.view">
|
||||
<field name="name">project.scrum.sprint.calendar</field>
|
||||
<field name="model">project.scrum.sprint</field>
|
||||
|
@ -204,7 +204,7 @@
|
|||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_scrum_sprint_tree" model="ir.ui.view">
|
||||
<field name="name">project.scrum.sprint.tree</field>
|
||||
<field name="model">project.scrum.sprint</field>
|
||||
|
@ -357,7 +357,7 @@
|
|||
<!--
|
||||
Daily Meeting
|
||||
-->
|
||||
|
||||
|
||||
<record id="view_scrum_meeting_calendar" model="ir.ui.view">
|
||||
<field name="name">project.scrum.meeting.calendar</field>
|
||||
<field name="model">project.scrum.meeting</field>
|
||||
|
@ -369,7 +369,7 @@
|
|||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_scrum_meeting_tree" model="ir.ui.view">
|
||||
<field name="name">project.scrum.meeting.tree</field>
|
||||
<field name="model">project.scrum.meeting</field>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
import project_scrum_backlog_create_task
|
||||
import project_scrum_backlog_sprint
|
||||
import project_scrum_backlog_merger
|
||||
import project_scrum_postpone
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
Loading…
Reference in New Issue