diff options
| author | Mustufa Rangwala <mra@mra-laptop> | 2010-07-02 20:15:03 +0530 |
|---|---|---|
| committer | Mustufa Rangwala <mra@mra-laptop> | 2010-07-02 20:15:03 +0530 |
| commit | 2d63bd763496a9b7399d02ca2a4e1e9790442fcb (patch) | |
| tree | a8f1655a658bed949f044c723e43b952d812222b /addons/project/wizard/project_close_task.py | |
| parent | 8c8a9c4b92b7901d2871e3a50decca9689c0c96e (diff) | |
| parent | db470305838faecdf26e5535b890b86f7aab2931 (diff) | |
[MERGE] Merge Team3 work from addons3 branch
bzr revid: mra@mra-laptop-20100702144503-0yynbrlkxn0v76lt
Diffstat (limited to 'addons/project/wizard/project_close_task.py')
| -rw-r--r-- | addons/project/wizard/project_close_task.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/addons/project/wizard/project_close_task.py b/addons/project/wizard/project_close_task.py index 00752606bd0..b1cd933a4f7 100644 --- a/addons/project/wizard/project_close_task.py +++ b/addons/project/wizard/project_close_task.py @@ -33,9 +33,11 @@ class project_close_task(osv.osv_memory): _columns = { 'email': fields.char('E-Mail', size=64, help="Email Address"), 'description': fields.text('Description'), - } + } - def _get_email(self, cr, uid, context={}): + def _get_email(self, cr, uid, context=None): + if context is None: + context = {} email = '' if 'task_id' in context: task = self.pool.get('project.task').browse(cr, uid, context['task_id']) @@ -44,7 +46,9 @@ class project_close_task(osv.osv_memory): email = partner_id.address[0].email return email - def _get_desc(self, cr, uid, context={}): + def _get_desc(self, cr, uid, context=None): + if context is None: + context = {} if 'task_id' in context: task = self.pool.get('project.task').browse(cr, uid, context['task_id']) return task.description or task.name @@ -55,7 +59,9 @@ class project_close_task(osv.osv_memory): 'description': _get_desc, } - def confirm(self, cr, uid, ids, context={}): + def confirm(self, cr, uid, ids, context=None): + if context is None: + context = {} if not 'task_id' in context: return {} close_task = self.read(cr, uid, ids[0], []) @@ -88,4 +94,4 @@ class project_close_task(osv.osv_memory): return {} project_close_task() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
