diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py index 922e7358700..5d9c2da860f 100755 --- a/addons/account_followup/wizard/account_followup_print.py +++ b/addons/account_followup/wizard/account_followup_print.py @@ -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: