diff options
| author | PAP(OpenERP) <> | 2010-08-20 17:08:44 +0530 |
|---|---|---|
| committer | Mustufa Rangwala <mra@mra-laptop> | 2010-08-20 17:08:44 +0530 |
| commit | ad7a4d48812be210524bc1e6ffd82af8ee3114e7 (patch) | |
| tree | 9f0f605589de7aa3db29a49c7f48e3601b55c6af /addons/project/wizard/project_close_task.py | |
| parent | ac330c97e3987633b9ddddbf357aec498145e042 (diff) | |
[ADD] Project_mailgate module added (separated it from project)
bzr revid: mra@mra-laptop-20100820113844-c2340zsy0y1h271h
Diffstat (limited to 'addons/project/wizard/project_close_task.py')
| -rw-r--r-- | addons/project/wizard/project_close_task.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/project/wizard/project_close_task.py b/addons/project/wizard/project_close_task.py index 609735500f9..eb5589f2e3a 100644 --- a/addons/project/wizard/project_close_task.py +++ b/addons/project/wizard/project_close_task.py @@ -119,7 +119,9 @@ class project_close_task(osv.osv_memory): body = u'%s\n%s\n%s\n\n-- \n%s' % (header, description, footer, signature) to_adr.append(context.get('send_manager', '') and close_task.get('manager_email', '') or '') to_adr.append(context.get('send_partner', '') and close_task.get('partner_email', '') or '') - email(from_adr, to_adr, subject, body.encode('utf-8'), email_bcc=[from_adr]) + mail_id = email(from_adr, to_adr, subject, body.encode('utf-8'), email_bcc=[from_adr]) + if not mail_id: + raise osv.except_osv(_('Error'), _("Couldn't send mail! Check the email ids and smtp configuration settings")) task_obj.write(cr, uid, [task.id], {'state': 'done', 'date_end':time.strftime('%Y-%m-%d %H:%M:%S'), 'remaining_hours': 0.0}) message = _('Task ') + " '" + task.name + "' "+ _("is Done.") self.log(cr, uid, task.id, message) |
