diff options
| author | sbh (Open ERP) <sbh@tinyerp.com> | 2010-08-26 15:38:31 +0530 |
|---|---|---|
| committer | sbh (Open ERP) <sbh@tinyerp.com> | 2010-08-26 15:38:31 +0530 |
| commit | 4f51e523a6d6c7dc44e72c49e98c46cbf8d2c1e8 (patch) | |
| tree | 139deb265228ef3bbf77fa22f5b3cbf03f5037a9 /addons/project/wizard/project_close_task.py | |
| parent | df2283c00733efdafd0da0d19e1234619b8fdfef (diff) | |
[Fix] project : check the description is exist or not
bzr revid: sbh@tinyerp.com-20100826100831-fb6b59w7bhb3s5br
Diffstat (limited to 'addons/project/wizard/project_close_task.py')
| -rw-r--r-- | addons/project/wizard/project_close_task.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/project/wizard/project_close_task.py b/addons/project/wizard/project_close_task.py index 58d085774df..f98d8853271 100644 --- a/addons/project/wizard/project_close_task.py +++ b/addons/project/wizard/project_close_task.py @@ -75,13 +75,14 @@ class project_close_task(osv.osv_memory): def close(self, cr, uid, ids, context=None): data = self.read(cr,uid,ids)[0] + notes=data['description'] or '' task_pool = self.pool.get('project.task') user_name = self.pool.get('res.users').browse(cr, uid, uid).name description = _("Closed By ") + user_name + _(" At ") + time.strftime('%Y-%m-%d %H:%M:%S') - description += "\n" + "=======================" + "\n" + data['description'] + description += "\n" + "=======================" + "\n" + notes if 'task_id' in context: task = task_pool.browse(cr, uid, context['task_id']) - description = task.description + "\n\n" + description + description = task.description and task.description + "\n\n" + description task_pool.write(cr, uid, [task.id], { 'description': description, 'state': 'done', |
