improved_view_project
bzr revid: fp@tinyerp.com-20090309113013-glo7yo10hii0dod5
This commit is contained in:
parent
e44cc62ef9
commit
9c2670c118
|
@ -34,7 +34,7 @@ class project(osv.osv):
|
|||
def _complete_name(self, cr, uid, ids, name, args, context):
|
||||
res = {}
|
||||
for m in self.browse(cr, uid, ids, context=context):
|
||||
res[m.id] = (res.parent_id and (res.parent_id.complete_name + '/') or '') + res.name
|
||||
res[m.id] = (m.parent_id and (m.parent_id.name + '/') or '') + m.name
|
||||
return res
|
||||
|
||||
|
||||
|
@ -244,7 +244,7 @@ class task(osv.osv):
|
|||
res[task.id]['delay_hours'] = res[task.id]['total_hours'] - task.planned_hours
|
||||
return res
|
||||
|
||||
def onchange_planned(self, cr, uid, ids, planned, effective):
|
||||
def onchange_planned(self, cr, uid, ids, planned, effective=0.0):
|
||||
return {'value':{'remaining_hours': planned-effective}}
|
||||
|
||||
def _default_project(self, cr, uid, context={}):
|
||||
|
|
|
@ -83,10 +83,8 @@
|
|||
<field name="complete_name"/>
|
||||
<field name="manager"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="planned_hours" widget="float_time"/>
|
||||
<field name="total_hours" widget="float_time"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
<field name="progress_rate" widget="progressbar"/>
|
||||
<field name="total_hours" widget="float_time"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
|
|
@ -30,15 +30,9 @@
|
|||
<field name="name">Contexts</field>
|
||||
<field name="res_model">project.gtd.context</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="open_gtd_context_tree_my">
|
||||
<field name="name">My Contexts</field>
|
||||
<field name="res_model">project.gtd.context</field>
|
||||
<field name="domain">[('user_id','=',uid)]</field>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem name="Time Management" id="menu_open_gtd_time" parent="project.menu_definitions"/>
|
||||
<menuitem name="Contexts" id="menu_open_gtd_time_contexts" parent="menu_open_gtd_time" action="open_gtd_context_tree"/>
|
||||
<menuitem name="My Contexts" id="menu_open_gtd_time_my_contexts" parent="menu_open_gtd_time_contexts" action="open_gtd_context_tree_my"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_gtd_timebox_tree">
|
||||
<field name="name">project.gtd.timebox.tree</field>
|
||||
|
@ -112,7 +106,10 @@
|
|||
<field name="date_start"/>
|
||||
<field name="priority"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="planned_hours" widget="float_time" sum="Est. Hours"/>
|
||||
<field name="planned_hours" widget="float_time" sum="Planned"
|
||||
on_change="onchange_planned(planned_hours,effective_hours)"/>
|
||||
<field name="remaining_hours" invisible="1"/>
|
||||
<field name="effective_hours" invisible="1"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -145,12 +142,16 @@
|
|||
<field name="name">My Timeboxes</field>
|
||||
<field name="res_model">project.gtd.timebox</field>
|
||||
<field name="domain">[('user_id','=',uid)]</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="view_gtd_timebox_treelist"/>
|
||||
<field name="context">{'record_id':False}</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="All My Timeboxes" id="menu_open_time_allinbox" parent="menu_open_time" action="open_gtd_timebox_all"/>
|
||||
<menuitem
|
||||
name="All My Timeboxes"
|
||||
id="menu_open_time_allinbox"
|
||||
parent="menu_open_time"
|
||||
action="open_gtd_timebox_all"/>
|
||||
|
||||
<record model="ir.ui.view" id="project_task">
|
||||
<field name="name">project.task.form.timebox</field>
|
||||
|
|
Loading…
Reference in New Issue