[FIX] delegation wizard parents

bzr revid: fp@tinyerp.com-20100215153131-7nxqoouk1962avrk
This commit is contained in:
Fabien Pinckaers 2010-02-15 16:31:31 +01:00
parent c2f325f43b
commit c3169779c9
3 changed files with 14 additions and 14 deletions

View File

@ -307,7 +307,7 @@ class task(osv.osv):
'project_id': fields.many2one('project.project', 'Project', ondelete='cascade',
help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
'parent_ids': fields.many2many('project.task', 'project_task_parent_rel', 'task_id', 'parent_id', 'Parent Tasks'),
'child_ids': fields.many2many('project.task', 'project_task_child_rel', 'task_id', 'child_id', 'Delegated Tasks'),
'child_ids': fields.many2many('project.task', 'project_task_parent_rel', 'parent_id', 'task_id', 'Delegated Tasks'),
'notes': fields.text('Notes'),
'occupation_rate': fields.float('Occupation Rate', help='The occupation rate fields indicates how much of his time a user is working on a task. A 100% occupation rate means the user works full time on the tasks. The ending date of a task is computed like this: Starting Date + Duration / Occupation Rate.'),
'planned_hours': fields.float('Planned Hours', required=True, help='Estimated time to do the task, usually set by the project manager when the task is in draft state.'),
@ -567,4 +567,4 @@ class users(osv.osv):
}
users()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -103,12 +103,17 @@
<field name="arch" type="xml">
<search string="Search Project">
<group col='8' colspan='4'>
<filter icon="terp-project" string="My Projects" domain="[('user_id', '=', uid)]" help="My Projects"/>
<filter icon="terp-project" string="Templates" domain="[('state','=','template')]" help="Template Projects"/>
<separator orientation="vertical"/>
<field name="name" string="Project Name" select='1'/>
<field name="partner_id" string="Partner" select='1'/>
<field name="state" select="1"/>
<filter icon="terp-project" string="Open" domain="[('state', '=', 'open')]" help="Open Projects" default="1"/>
<filter icon="terp-project" string="Pending" domain="[('state', '=', 'pending')]" help="Pending Projects"/>
<separator orientation="vertical"/>
<filter icon="terp-project" string="Manager" domain="[('user_id', '=', uid)]" help="Projects in which I am a manager."/>
<filter icon="terp-project" string="Member" domain="[('members', '=', uid)]" help="Projects in which I am a member." default="1"/>
<separator orientation="vertical"/>
<filter icon="terp-project" string="Templates" domain="[('state','=','template')]" help="Template Projects"/>
<separator orientation="vertical"/>
<field name="name" string="Project Name" select='1'/>
<field name="partner_id" string="Partner" select='1'/>
<field name="state" select="1"/>
</group>
</search>
</field>
@ -267,7 +272,7 @@
<separator string="Parent Tasks" colspan="4"/>
<field colspan="4" height="150" name="parent_ids" nolabel="1"/>
<separator string="Delegated tasks" colspan="4"/>
<field colspan="4" height="150" name="child_ids" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
<field colspan="4" height="150" name="child_ids" nolabel="1">
<tree string="Delegated tasks">
<field name="name"/>
<field name="user_id"/>

View File

@ -67,7 +67,6 @@ class wizard_delegate(wizard.interface):
'remaining_hours': data['form']['planned_hours_me'],
'planned_hours': data['form']['planned_hours_me'] + (task.effective_hours or 0.0),
'name': newname,
'child_ids': [(6, 0, [new_task_id])]
})
if data['form']['state']=='pending':
task_obj.do_pending(cr, uid, [data['id']])
@ -106,7 +105,3 @@ class wizard_delegate(wizard.interface):
}
}
wizard_delegate('project.task.delegate')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: