[IMP] misc changes for project, scrum and project_issue
bzr revid: mra@tinyerp.com-20100512124048-yi0w3mz098sgvrpo
This commit is contained in:
@@ -549,7 +549,7 @@ class config_compute_remaining(osv.osv_memory):
|
||||
return False
|
||||
|
||||
_columns = {
|
||||
'remaining_hours' : fields.float('Remaining Hours', digits=(16,2), help="Total remaining time, can be re-estimated periodically by the assignee of the task."),
|
||||
'remaining_hours' : fields.float('Remaining Hours', digits=(16,2), help="Re-estimated Time to change the remaining hours of the task"),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
||||
@@ -204,10 +204,11 @@
|
||||
<field name="model">config.compute.remaining</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Remaining Hours">
|
||||
<form string="Reevaluate Hours">
|
||||
<separator colspan="4" string="Change Remaining Hours"/>
|
||||
<newline/>
|
||||
<field name="remaining_hours" widget="float_time"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-refresh" name="compute_hours" string="Update" type="object" default_focus="1"/>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<newline/>
|
||||
<field name="description" />
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="_Close"/>
|
||||
<button icon="gtk-ok" name="confirm" string="Send Mail" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -104,7 +104,8 @@ class project_issue(osv.osv):
|
||||
if out_time > date_until:
|
||||
break
|
||||
duration = len(no_days)
|
||||
res[issue.id][field] = abs(int(duration))
|
||||
res[issue.id][field] = abs(float(duration))
|
||||
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
@@ -124,9 +125,9 @@ class project_issue(osv.osv):
|
||||
'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]"),
|
||||
'date_open': fields.datetime('Opened', readonly=True),
|
||||
'day_open': fields.function(_compute_day, string='Days to Open', \
|
||||
method=True, multi='day_open', type="integer", store=True),
|
||||
method=True, multi='day_open', type="float", store=True),
|
||||
'day_close': fields.function(_compute_day, string='Days to Close', \
|
||||
method=True, multi='day_close', type="integer", store=True),
|
||||
method=True, multi='day_close', type="float", store=True),
|
||||
'assigned_to' : fields.many2one('res.users', 'Assigned to'),
|
||||
}
|
||||
|
||||
|
||||
@@ -220,9 +220,9 @@ class scrum_product_backlog(osv.osv):
|
||||
'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'),
|
||||
'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."),
|
||||
'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 time to do the task.'),
|
||||
'expected_hours': fields.float('Expected Hours', help='Estimated total time to do the Backlog'),
|
||||
'date':fields.datetime("Created Date"),
|
||||
}
|
||||
_defaults = {
|
||||
|
||||
+38
-11
@@ -65,23 +65,50 @@
|
||||
<field name="project_id" select="1"/>
|
||||
<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="progress" widget="progressbar"/>
|
||||
<field name="date"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
<field name="sequence"/>
|
||||
<newline/>
|
||||
<group colspan="6" col="8">
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
<field name="planned_hours" widget="float_time"/>
|
||||
<field name="expected_hours" widget="float_time"/>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Feature Description">
|
||||
<page string="Information">
|
||||
<group colspan="6" col="8">
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
<field name="planned_hours" widget="float_time"/>
|
||||
<field name="expected_hours" widget="float_time"/>
|
||||
</group>
|
||||
<separator string="Feature Description" colspan="4"/>
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Tasks">
|
||||
<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}"/>
|
||||
<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}">
|
||||
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours<0;red:bool(date_deadline) and (date_deadline<current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
|
||||
<field name="sequence" invisible="0"/>
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="delegated_user_id" invisible="context.get('show_delegated', True)"/>
|
||||
<field name="planned_hours" widget="float_time" />
|
||||
<field name="total_hours" widget="float_time"/>
|
||||
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" invisible="context.get('set_visible',False)"/>
|
||||
<field name="date_deadline" invisible="context.get('set_visible',False)"/>
|
||||
<field name="type" groups="base.group_extended" invisible="context.get('set_visible',False)"/>
|
||||
<field name="date_start" invisible="1"/>
|
||||
<field name="date_end" invisible="1"/>
|
||||
<button name="next_type" invisible="context.get('set_visible',False)"
|
||||
states="draft,open,pending"
|
||||
string="Change Stage"
|
||||
type="object"
|
||||
icon="gtk-go-forward"
|
||||
groups="base.group_extended"
|
||||
help="Change Type"/>
|
||||
<field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/>
|
||||
<field name="state" invisible="context.get('set_visible',False)"/>
|
||||
<button name="do_open" states="pending,draft,done,cancel" string="Start Task" type="object" icon="gtk-execute" help="For changing to open state" invisible="context.get('set_visible',False)"/>
|
||||
<button groups="base.group_extended" name="%(project.action_project_task_delegate)d" states="pending,open,draft" string="Delegate" type="action" icon="gtk-execute" help="For changing to delegate state"/>
|
||||
<button name="do_close" states="draft,pending,open" string="Done" type="object" icon="gtk-jump-to" help="For changing to done state"/>
|
||||
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel" help="For cancelling the task"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="8" colspan="4">
|
||||
|
||||
@@ -54,7 +54,7 @@ class backlog_create_task(osv.osv_memory):
|
||||
|
||||
return {
|
||||
'domain': "[('product_backlog_id','in',["+','.join(map(str, context['active_ids']))+"])]",
|
||||
'name': 'Open Backlog Tasks',
|
||||
'name': 'Tasks',
|
||||
'res_id': ids_task,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
|
||||
Reference in New Issue
Block a user