From 8382ecb5f9557fb81459b8a64381fab45ef84cf6 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 26 Aug 2013 23:21:23 +0200 Subject: [PATCH] Raise an explicit exception (take into account Stefan remark on the merge proposal) --- intrastat_base/intrastat_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intrastat_base/intrastat_common.py b/intrastat_base/intrastat_common.py index fba3a08..ba7060b 100644 --- a/intrastat_base/intrastat_common.py +++ b/intrastat_base/intrastat_common.py @@ -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)