From c206a83c2b5aeb45e6e93ae48c204c8aa19c6728 Mon Sep 17 00:00:00 2001 From: husen daudi Date: Thu, 26 Feb 2009 16:03:11 +0530 Subject: [PATCH 1/2] Improvements by Christophe Chauvet bzr revid: hda@hda-20090226103311-1vb5zh70n0owuyba --- addons/project/project.py | 4 ++-- addons/project/project_view.xml | 26 +++++++++++++++++--------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index fc0fca5d04d..3dc09a50c5c 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -271,7 +271,7 @@ class task(osv.osv): 'history': fields.function(_history_get, method=True, string="Task Details", type="text"), 'notes': fields.text('Notes'), - 'planned_hours': fields.float('Planned Hours', readonly=True, states={'draft':[('readonly',False)]}, required=True, help='Estimated time to do the task, usually set by the project manager when the task is in draft state.'), + '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.'), 'effective_hours': fields.function(_hours_get, method=True, string='Hours Spent', multi='hours', store=True, help="Computed using the sum of the task work done."), 'remaining_hours': fields.float('Remaining Hours', digits=(16,2), help="Total remaining time, can be re-estimated periodically by the assignee of the task."), 'total_hours': fields.function(_hours_get, method=True, string='Total Hours', multi='hours', store=True, help="Computed as: Time Spent + Remaining Time."), @@ -280,7 +280,7 @@ class task(osv.osv): 'user_id': fields.many2one('res.users', 'Assigned to'), 'partner_id': fields.many2one('res.partner', 'Partner'), - 'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done', readonly=False, states={'draft':[('readonly',True)]}), + 'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done'), } _defaults = { 'user_id': lambda obj,cr,uid,context: uid, diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 0c216b99407..627f69286e2 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -243,11 +243,11 @@
- - - - - + + + + + @@ -256,6 +256,7 @@