[IMP] in the tree view My Pending Tasks, put the person we delegated the task to (fields.related).
[IMP] Tasks delegation, when we delegate a task, there is a checkbox: "copy description". Removed this checkbox and replaced by a text field that shows the descritpion of the task. So that you can edit before confirming delegation. bzr revid: qdp@tinyerp.com-20090402122247-zzjtb8dn0xxw2zld
This commit is contained in:
@@ -289,6 +289,7 @@ class task(osv.osv):
|
||||
'delay_hours': fields.function(_hours_get, method=True, string='Delay Hours', multi='hours', store=True, help="Computed as: Total Time - Estimated Time. It gives the difference of the time estimated by the project manager and the real time to close the task."),
|
||||
|
||||
'user_id': fields.many2one('res.users', 'Assigned to'),
|
||||
'delegated_user_id': fields.related('child_ids','user_id',type='many2one', relation='res.users', string='Delegated To'),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner'),
|
||||
'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done'),
|
||||
}
|
||||
|
||||
@@ -359,6 +359,28 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="my_pending_task" model="ir.ui.view">
|
||||
<field name="name">my.pending.task.tree</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="type">tree</field>
|
||||
<field eval="2" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="grey:state in ('cancel','done');blue:remaining_hours<0;red:bool(date_deadline) & (date_deadline<current_date) & (state in ('draft','open'))" string="Tasks">
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
<field name="delegated_user_id"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="planned_hours" sum="Planned" widget="float_time"/>
|
||||
<field name="delay_hours" sum="Delay" widget="float_time"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
<field name="priority"/>
|
||||
<field name="state"/>
|
||||
<field name="remaining_hours" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_task_calendar" model="ir.ui.view">
|
||||
<field name="name">project.task.calendar</field>
|
||||
<field name="model">project.task</field>
|
||||
@@ -423,6 +445,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field name="domain">[('user_id', '=', uid),('state','=','pending')]</field>
|
||||
<field name="view_id" ref="my_pending_task"/>
|
||||
</record>
|
||||
<menuitem action="action_view_task5_pending" id="menu_tasks_yours_pending" parent="menu_action_view_task4"/>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ ask_form = """<?xml version="1.0" ?>
|
||||
<field name="user_id" colspan="4"/>
|
||||
<field name="planned_hours" colspan="4" widget="float_time"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="include_info"/>
|
||||
<field name="new_task_description"/>
|
||||
<separator string="Validation Task" colspan="4"/>
|
||||
<field name="planned_hours_me" colspan="4" widget="float_time"/>
|
||||
<field name="prefix" colspan="4"/>
|
||||
@@ -42,7 +42,7 @@ ask_fields = {
|
||||
'name': {'string': 'Delegated Title', 'type': 'char', 'required': 'True', 'size':64, 'help':"New title of the task delegated to the user."},
|
||||
'prefix': {'string': 'Your Task Title', 'type': 'char', 'required': 'True', 'size':64, 'help':"New title of your own task to validate the work done."},
|
||||
'user_id': {'string':'Assign To', 'type':'many2one', 'relation': 'res.users', 'required':'True', 'help':"User you want to delegate this task to."},
|
||||
'include_info': {'string':'Copy Description', 'type':'boolean', 'help':"Reinclude the description of the task in the task of the user."},
|
||||
'new_task_description': {'string':'New Task Description', 'type':'text', 'help':"Reinclude the description of the task in the task of the user."},
|
||||
'planned_hours': {'string':'Planned Hours', 'type':'float', 'widget':'float_time', 'help':"Estimated time to close this task by the delegated user."},
|
||||
'planned_hours_me': {'string':'Hours to Validate', 'type':'float', 'widget':'float_time', 'help':"Estimated time for you to validate the work done by the user to whom you delegate this task."},
|
||||
'state': {'string':'Validation State', 'type':'selection', 'selection': [('pending','Pending'),('done','Done')], 'help':"New state of your own task. Pending will be reopened automatically when the delegated task is closed.", 'required':True},
|
||||
@@ -60,7 +60,7 @@ class wizard_delegate(wizard.interface):
|
||||
'remaining_hours': data['form']['planned_hours'],
|
||||
'parent_id': data['id'],
|
||||
'state': 'open',
|
||||
'description': data['form']['include_info'] and task.description or '',
|
||||
'description': data['form']['new_task_description'] or '',
|
||||
'child_ids': [],
|
||||
'work_ids': []
|
||||
})
|
||||
@@ -87,7 +87,7 @@ class wizard_delegate(wizard.interface):
|
||||
'planned_hours': task.remaining_hours,
|
||||
'planned_hours_me': 1.0,
|
||||
'prefix': _('CHECK: ')+ newname,
|
||||
'include_info': 1,
|
||||
'new_task_description': task.description,
|
||||
'state': 'pending'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user