diff options
| author | atp (Open ERP) <atp@tinyerp.co.in> | 2010-06-22 10:45:44 +0530 |
|---|---|---|
| committer | atp (Open ERP) <atp@tinyerp.co.in> | 2010-06-22 10:45:44 +0530 |
| commit | b0efd26edd9f4e2aa75424b787ea46d2be15cd04 (patch) | |
| tree | e78cdb693e62a5c9a17f77a395eec51fb34becbf /addons/scrum | |
| parent | 46bb1ea51be702758d68a5f69db32c82dbccf9bd (diff) | |
| parent | 2319190c5a20cb8095f85cacca89a33164ba93d7 (diff) | |
[MERGE]: merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons2
bzr revid: atp@tinyerp.co.in-20100622051544-c7hig73zk2at66cy
Diffstat (limited to 'addons/scrum')
| -rw-r--r-- | addons/scrum/__openerp__.py | 1 | ||||
| -rw-r--r-- | addons/scrum/board_scrum_view.xml | 63 | ||||
| -rw-r--r-- | addons/scrum/report/_burndown.py | 6 | ||||
| -rw-r--r-- | addons/scrum/report/task_burndown.py | 8 | ||||
| -rw-r--r-- | addons/scrum/scrum.py | 70 | ||||
| -rw-r--r-- | addons/scrum/scrum_demo.xml | 79 | ||||
| -rw-r--r-- | addons/scrum/scrum_view.xml | 23 | ||||
| -rw-r--r-- | addons/scrum/wizard/scrum_backlog_sprint.py | 2 |
8 files changed, 220 insertions, 32 deletions
diff --git a/addons/scrum/__openerp__.py b/addons/scrum/__openerp__.py index 2f4007793ac..ef552090c67 100644 --- a/addons/scrum/__openerp__.py +++ b/addons/scrum/__openerp__.py @@ -57,6 +57,7 @@ 'process/scrum_process.xml', 'wizard/scrum_backlog_sprint_view.xml', 'wizard/scrum_backlog_merger_view.xml', + "board_scrum_view.xml", ], 'demo_xml': ['scrum_demo.xml'], 'installable': True, diff --git a/addons/scrum/board_scrum_view.xml b/addons/scrum/board_scrum_view.xml new file mode 100644 index 00000000000..5184aefa79c --- /dev/null +++ b/addons/scrum/board_scrum_view.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + <record id="view_scrum_sprint_dashboard_tree" model="ir.ui.view"> + <field name="name">scrum.sprint.dashboard.tree</field> + <field name="model">scrum.sprint</field> + <field name="type">tree</field> + <field name="arch" type="xml"> + <tree string="Scrum Sprint"> + <field name="name"/> + <field name="project_id"/> + <field name="scrum_master_id"/> + <field name="product_owner_id" invisible="1"/> + <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="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="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 name="%(scrum.report_scrum_sprint_burndown_chart)d" states="open,draft,close,cancel" + string="Burndown Chart" type="action" icon="gtk-print"/> + </tree> + </field> + </record> + <record id="action_sprint_all_dashboard_tree" model="ir.actions.act_window"> + <field name="name">Sprint's List</field> + <field name="res_model">scrum.sprint</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + <field name="view_id" ref="view_scrum_sprint_dashboard_tree"/> + </record> + <record id="board_project_scrum_form" model="ir.ui.view"> + <field name="name">board.project.form</field> + <field name="model">board.board</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <form string="My Board"> + <hpaned> + <child1> + <action colspan="4" height="220" name="%(action_sprint_all_dashboard_tree)d" string="Sprints" width="510"/> + </child1> + </hpaned> + </form> + </field> + </record> + <record id="open_board_project_scrum" model="ir.actions.act_window"> + <field name="name">Scrum Dashboard</field> + <field name="res_model">board.board</field> + <field name="view_type">form</field> + <field name="view_mode">form</field> + <field name="usage">menu</field> + <field name="view_id" ref="board_project_scrum_form"/> + </record> + <menuitem + id="menu_deshboard_scurm" + name="Scrum Dashboard" parent="project.next_id_86" + icon="terp-graph" action="open_board_project_scrum"/> + </data> +</openerp> diff --git a/addons/scrum/report/_burndown.py b/addons/scrum/report/_burndown.py index 7f5239e1224..6f0db24bcb6 100644 --- a/addons/scrum/report/_burndown.py +++ b/addons/scrum/report/_burndown.py @@ -26,13 +26,13 @@ import time def compute_burndown(cr, uid, tasks_id, date_start, date_stop): latest = False if len(tasks_id): - cr.execute('select id,create_date,state,planned_hours from project_task where id = ANY(%s) order by create_date',(tasks_id,)) + cr.execute('select id,create_date,state,planned_hours from project_task where id IN %s order by create_date',(tuple(tasks_id),)) tasks = cr.fetchall() - cr.execute('select w.date,w.hours from project_task_work w left join project_task t on (t.id=w.task_id) where t.id = ANY(%s) and t.state in (%s,%s) order by date',(tasks_id,'open','progress',)) + cr.execute('select w.date,w.hours from project_task_work w left join project_task t on (t.id=w.task_id) where t.id IN %s and t.state in (%s,%s) order by date',(tuple(tasks_id),'open','progress',)) tasks2 = cr.fetchall() - cr.execute('select date_end,planned_hours from project_task where id =ANY(%s) and state in (%s,%s) order by date_end' ,(tasks_id,'cancelled','done',)) + cr.execute('select date_end,planned_hours from project_task where id IN %s and state in (%s,%s) order by date_end' ,(tuple(tasks_id),'cancelled','done',)) tasks2 += cr.fetchall() tasks2.sort() else: diff --git a/addons/scrum/report/task_burndown.py b/addons/scrum/report/task_burndown.py index 36296bcee5f..efd285c357e 100644 --- a/addons/scrum/report/task_burndown.py +++ b/addons/scrum/report/task_burndown.py @@ -43,9 +43,9 @@ class external_pdf(render): def burndown_chart(cr, uid, tasks_id, date_start, date_stop): latest = False - cr.execute('select id,date_start,state,planned_hours from project_task where id = ANY(%s) order by date_start'(tasks_id,)) + cr.execute('select id,date_start,state,planned_hours from project_task where id IN %s order by date_start'(tuple(tasks_id),)) tasks = cr.fetchall() - cr.execute('select id,date_end,state,planned_hours*progress/100 from project_task where id =ANY(%s) and state in (%s,%s) order by date_end', (tasks_id,'progress','done',)) + cr.execute('select id,date_end,state,planned_hours*progress/100 from project_task where id IN %s and state in (%s,%s) order by date_end', (tuple(tasks_id),'progress','done',)) tasks2 = cr.fetchall() current_date = date_start total = 0 @@ -72,14 +72,14 @@ class report_tasks(report_int): io = StringIO.StringIO() if 'date_start' not in datas: - cr.execute('select min(date_start) from project_task where id = ANY(%s)',(ids,)) + cr.execute('select min(date_start) from project_task where id IN %s',(tuple(ids),)) dt = cr.fetchone()[0] if dt: datas['date_start'] = dt[:10] else: datas['date_start'] = time.strftime('%Y-%m-%d') if 'date_stop' not in datas: - cr.execute('select max(date_start),max(date_end) from project_task where id = ANY(%s)',(ids,)) + cr.execute('select max(date_start),max(date_end) from project_task where id IN %s',(tuple(ids),)) res = cr.fetchone() datas['date_stop'] = (res[0] and res[0][:10]) or time.strftime('%Y-%m-%d') if res[1] and datas['date_stop']<res[1]: diff --git a/addons/scrum/scrum.py b/addons/scrum/scrum.py index 698b490f1a2..b734473dce8 100644 --- a/addons/scrum/scrum.py +++ b/addons/scrum/scrum.py @@ -19,11 +19,13 @@ # ############################################################################## import time -import netsvc +from mx import DateTime +import netsvc from osv import fields, osv, orm -from mx import DateTime import re +import tools +from tools.translate import _ class scrum_project(osv.osv): _inherit = 'project.project' @@ -49,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) @@ -69,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): @@ -106,15 +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_planned, method=True, string='Planned Hours', help='Estimated time to do the task, usually set by the project manager when the task is in draft state.'), - 'expected_hours': fields.function(_calc_expected, method=True, string='Expected 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 = { @@ -184,7 +185,7 @@ class scrum_product_backlog(osv.osv): res[bl.id] += task.effective_hours return res - def _calc_planned(self, cr, uid, ids, name, args, context): + def _calc_task(self, cr, uid, ids, name, args, context): res = {} for bl in self.browse(cr, uid, ids): res.setdefault(bl.id, 0.0) @@ -216,6 +217,21 @@ class 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): + 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'), @@ -228,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.function(_calc_planned, method=True, string='Planned Hours', help='Estimated time to do the task, usually set by the project manager when the task is in draft state.'), - 'expected_hours': fields.float('Expected 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='Task Hours', help='Estimated time of the total hours of the tasks') } _defaults = { 'state': 'draft', @@ -287,5 +303,37 @@ class scrum_meeting(osv.osv): _defaults = { 'date' : time.strftime('%Y-%m-%d'), } + + def button_send_to_master(self, cr, uid, ids, context=None): + meeting_id = self.browse(cr, uid, ids)[0] + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) + if meeting_id and meeting_id.sprint_id.scrum_master_id.user_email: + self.email_send(cr, uid, ids, email) + else: + raise osv.except_osv(_('Error !'), _('Please provide email address for scrum master defined on sprint.')) + return True + + def button_send_product_owner(self, cr, uid, ids, context=None): + meeting_id = self.browse(cr, uid, ids)[0] + if meeting_id.sprint_id.product_owner_id.user_email: + self.email_send(cr,uid,ids,email) + else: + raise osv.except_osv(_('Error !'), _('Please provide email address for product owner defined on sprint.')) + return True + + def email_send(self, cr, uid, ids, email, context=None): + 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 = "Hello " + meeting_id.sprint_id.scrum_master_id.name+",\n" +" \nI am sending you Daily Meeting Details of date %s for the Sprint %s \n" % (meeting_id.date, meeting_id.sprint_id.name) + body += '\n*Tasks since yesterday: \n_______________________%s' % (meeting_id.question_yesterday) + '\n*Task for Today :\n_______________________ %s\n' % (meeting_id.question_today )+ '\n*Blocks encountered: \n_______________________ %s' % (meeting_id.question_blocks or 'No Blocks') + body += "\n\nThank you,\n"+ user.name + sub_name = meeting_id.name or 'Scrum Meeting of %s '%meeting_id.date + flag = tools.email_send(user_email , [email], sub_name, body, reply_to=None, openobject_id=str(meeting_id.id)) + if not flag: + raise osv.except_osv(_('Error !'), _(' Email Not send to %s!' % meeting_id.sprint_id.product_owner_id.name)) + return True + scrum_meeting() diff --git a/addons/scrum/scrum_demo.xml b/addons/scrum/scrum_demo.xml index 9f41f17a86b..9e97e635cf3 100644 --- a/addons/scrum/scrum_demo.xml +++ b/addons/scrum/scrum_demo.xml @@ -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> @@ -32,6 +32,7 @@ <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> <field name="project_id" ref="scrum_project_1"/> </record> <record id="scrum_product_backlog_1" model="scrum.product.backlog"> @@ -40,6 +41,7 @@ <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> <field name="project_id" ref="scrum_project_1"/> </record> <record id="scrum_product_backlog_2" model="scrum.product.backlog"> @@ -48,18 +50,21 @@ <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> <field name="project_id" ref="scrum_project_1"/> </record> <record id="scrum_product_backlog_3" model="scrum.product.backlog"> <field name="name">Review all terms</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="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"> @@ -72,8 +77,9 @@ <record id="scrum_product_backlog_6" model="scrum.product.backlog"> <field name="name">Reshape the complete menu</field> <field name="expected_hours">4.0</field> - <field name="note">Restrucutre the Open ERP menu to be more like others ERP.</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"> @@ -91,6 +97,8 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <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')" name="date_close"/> <field name="product_backlog_id" ref="scrum_product_backlog_3"/> </record> <record id="scrum_task_4" model="project.task"> @@ -98,6 +106,8 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <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')" name="date_close"/> <field name="product_backlog_id" ref="scrum_product_backlog_3"/> </record> <record id="scrum_task_5" model="project.task"> @@ -105,6 +115,8 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <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')" name="date_close"/> <field name="product_backlog_id" ref="scrum_product_backlog_1"/> </record> <record id="scrum_task_6" model="project.task"> @@ -112,6 +124,7 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <field name="project_id" ref="scrum_project_1"/> <field name="name">Test and improve automatic migration system</field> + <field name="state">open</field> <field name="product_backlog_id" ref="scrum_product_backlog_0"/> </record> <record id="scrum_task_7" model="project.task"> @@ -119,6 +132,7 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <field name="project_id" ref="scrum_project_1"/> <field name="name">General accounting features</field> + <field name="state">open</field> <field name="product_backlog_id" ref="scrum_product_backlog_1"/> </record> <record id="scrum_task_8" model="project.task"> @@ -133,7 +147,9 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <field name="project_id" ref="scrum_project_1"/> <field name="description">Cash book, general ledger, accounts list, aged trial balance</field> - <field name="name">Accounting Report General</field> + <field name="name">Accounting Report General</field> + <field name="state">open</field> + <field eval="[(6,0,[ref('scrum.scrum_task_8')])]" name="child_ids"/> <field name="product_backlog_id" ref="scrum_product_backlog_1"/> </record> <record id="scrum_task_10" model="project.task"> @@ -148,6 +164,7 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <field name="project_id" ref="scrum_project_1"/> <field name="name">Accounting Report Analytic</field> + <field name="state">open</field> <field name="product_backlog_id" ref="scrum_product_backlog_1"/> </record> <record id="scrum_task_12" model="project.task"> @@ -155,6 +172,8 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <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')" name="date_close"/> <field name="product_backlog_id" ref="scrum_product_backlog_4"/> </record> <record id="scrum_task_13" model="project.task"> @@ -162,6 +181,8 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <field name="project_id" ref="scrum_project_1"/> <field name="name">Bugfix - Translations</field> + <field name="state">open</field> + <field eval="[(6,0,[ref('scrum.scrum_task_12')])]" name="child_ids"/> <field name="product_backlog_id" ref="scrum_product_backlog_4"/> </record> <record id="scrum_task_14" model="project.task"> @@ -169,6 +190,7 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <field name="project_id" ref="scrum_project_1"/> <field name="name">Finish the automated plugin system</field> + <field name="state">pending</field> <field name="product_backlog_id" ref="scrum_product_backlog_2"/> </record> <record id="scrum_task_15" model="project.task"> @@ -183,6 +205,7 @@ <field model="res.users" name="user_id" search="[('login','=','demo')]"/> <field name="project_id" ref="scrum_project_1"/> <field name="name">Test 3.2.0 before releasing</field> + <field name="state">open</field> <field name="product_backlog_id" ref="scrum_product_backlog_5"/> </record> <record id="scrum_task_17" model="project.task"> @@ -191,8 +214,56 @@ <field name="project_id" ref="scrum_project_1"/> <field name="description">default values, onchange, required, add on top or bottom and shortcuts (Ctrl S, Ctrl X, ...)</field> <field name="name">Editable trees</field> + <field name="state">open</field> <field name="product_backlog_id" ref="scrum_product_backlog_7"/> </record> - + <record id="scrum_meeting_0" model="scrum.meeting"> + <field name="question_yesterday"> +Admin: Worked on the Automatic migration system +Demo: Worked on the Test 3.2.0 before releasing + </field> + <field name="question_today"> +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 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"/> + <field name="name">Learn how to migration</field> + <field name="task_id" ref="scrum_task_6"/> + <field name="company_id" ref="base.main_company"/> + <field eval="1.0" name="hours"/> + <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"/> + <field name="name">Create a script for migration and testing</field> + <field name="task_id" ref="scrum_task_6"/> + <field name="company_id" ref="base.main_company"/> + <field eval="5.0" name="hours"/> + <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"/> + <field name="name">Create a script for migration and testing</field> + <field name="task_id" ref="scrum_task_6"/> + <field name="company_id" ref="base.main_company"/> + <field eval="5.0" name="hours"/> + <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"/> + <field name="name">Add on top or bottom and shortcuts</field> + <field name="task_id" ref="scrum_task_17"/> + <field name="company_id" ref="base.main_company"/> + <field eval="10.0" name="hours"/> + <field eval="time.strftime('%Y-%m-%d')" name="date"/> + </record> + </data> </openerp> diff --git a/addons/scrum/scrum_view.xml b/addons/scrum/scrum_view.xml index 70c3e82ee56..2219d29c3ed 100644 --- a/addons/scrum/scrum_view.xml +++ b/addons/scrum/scrum_view.xml @@ -4,7 +4,7 @@ <menuitem id="menu_scrum" name="Scrum" - parent="base.menu_main_pm"/> + parent="base.menu_main_pm" sequence="3"/> <!-- Scrum Project --> @@ -40,7 +40,7 @@ <field name="sprint_id"/> <field name="user_id"/> <field name="progress" widget="progressbar"/> - <field name="expected_hours" sum="Expected 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,10 +57,13 @@ <field name="type">form</field> <field name="arch" type="xml"> <form string="Product backlog"> - <group colspan="4" col="6"> + <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" colspan="2" + icon="gtk-convert" attrs="{'invisible':[('state','=','done')]}"/> <field name="user_id" select="1"/> <field name="sequence" groups="base.group_extended"/> <field name="create_date"/> @@ -71,6 +74,7 @@ <group colspan="6" col="8"> <field name="expected_hours" widget="float_time"/> <field name="effective_hours" widget="float_time"/> + <field name="task_hours" widget="float_time"/> </group> <separator string="Feature Description" colspan="4"/> <field colspan="4" name="note" nolabel="1"/> @@ -172,7 +176,7 @@ <menuitem action="action_product_backlog_form" id="menu_action_product_backlog_form" - sequence="20" + sequence="10" parent="menu_scrum"/> <!-- @@ -192,8 +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="Expected 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"/> @@ -226,7 +229,6 @@ </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"/> @@ -293,7 +295,7 @@ <field name="search_view_id" ref="view_scrum_sprint_search"/> </record> <menuitem - sequence="10" + sequence="30" action="action_sprint_all_tree" id="menu_action_sprint_all_tree" parent="menu_scrum"/> <!-- @@ -329,6 +331,9 @@ <field colspan="4" name="question_today" nolabel="1"/> <separator colspan="4" string="Are there anything blocking you?"/> <field colspan="4" name="question_blocks" nolabel="1"/> + <separator colspan="4" string=""/> + <button name="button_send_to_master" type="object" string="Send to Scrum Master" icon="gtk-ok"/> + <button name="button_send_product_owner" type="object" string="Send to Product Owner" icon="gtk-ok"/> </page> <page string="Optional Info"> <separator colspan="4" string="Are your Sprint Backlog estimate accurate ?"/> @@ -375,7 +380,7 @@ <field name="context">{'search_default_scrum_daily':1}</field> <field name="search_view_id" ref="view_scrum_meeting_search"/> </record> - <menuitem sequence="30" + <menuitem sequence="20" action="action_meeting_form" id="menu_action_meeting_form" parent="menu_scrum"/> <!-- diff --git a/addons/scrum/wizard/scrum_backlog_sprint.py b/addons/scrum/wizard/scrum_backlog_sprint.py index 8125df1ba53..108e5a48cc3 100644 --- a/addons/scrum/wizard/scrum_backlog_sprint.py +++ b/addons/scrum/wizard/scrum_backlog_sprint.py @@ -49,7 +49,7 @@ class backlog_sprint_assign(osv.osv_memory): 'description': backlog.note, 'project_id': backlog.project_id.id, 'user_id': False, - 'planned_hours':backlog.planned_hours, + 'planned_hours':backlog.expected_hours, 'remaining_hours':backlog.expected_hours, }) if data['state_open'] and backlog.state == "draft": |
