mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
Raise an explicit exception (take into account Stefan remark on the merge proposal)
This commit is contained in:
committed by
Alexis de Lattre
parent
78298b3356
commit
8382ecb5f9
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user