From 7c7e1a12af8268670571cc95dab7c78dccfb562a Mon Sep 17 00:00:00 2001 From: Christophe Chauvet Date: Tue, 3 Mar 2009 15:52:55 +0100 Subject: [PATCH] [IMP] * add description field of work at the end of line to take all space available * made readonly all field when task done (reopen it to modify any fields). * user attrs in xml instead of syntax on object (when if possible) bzr revid: christophe.chauvet@syleam.fr-20090303145255-22ktokc2y0rxsi5q --- 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 @@