Raise an explicit exception (take into account Stefan remark on the merge proposal)

This commit is contained in:
Alexis de Lattre
2013-08-26 23:21:23 +02:00
committed by Alexis de Lattre
parent 78298b3356
commit 8382ecb5f9

View File

@@ -141,7 +141,7 @@ class report_intrastat_common(osv.TransientModel):
if template_data and template_data[0] == 'email.template':
template_id = template_data[1]
else:
raise
raise osv.except_osv(_('Error :'), _("Wrong model for XMLID '%s.%s': model is '%s' and it should be 'email.template'.") %(module_name, template_xmlid, template_data[0]))
if company.intrastat_remind_user_ids:
self.pool['email.template'].send_mail(cr, uid, template_id, intrastat_id, context=context)
logger.info('Intrastat Reminder email has been sent (XMLID: %s).' % template_xmlid)