[FIX] account_followup: raise an error when no sender email specified

bzr revid: psi@tinyerp.co.in-20110105104701-u51jjbdrsvgpttvl
This commit is contained in:
psi (Open ERP) 2011-01-05 16:17:01 +05:30
parent 7dfe8298e4
commit 8bf890a9d6
1 changed files with 6 additions and 3 deletions

View File

@ -275,8 +275,11 @@ class account_followup_print_all(osv.osv_memory):
sub = tools.ustr(data['email_subject'])
msg = ''
if dest:
tools.email_send(src,dest,sub,body)
msg_sent += partner.name + '\n'
try:
tools.email_send(src, dest, sub, body)
msg_sent += partner.name + '\n'
except Exception, e:
raise osv.except_osv('Error !', e )
else:
msg += partner.name + '\n'
msg_unsent += msg
@ -301,7 +304,7 @@ class account_followup_print_all(osv.osv_memory):
'type': 'ir.actions.act_window',
'target': 'new',
'nodestroy': True
}
}
def do_print(self, cr, uid, ids, context=None):
if context is None: