mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
Better use of the new API for send_mail(), as suggested by Yannick (and tested be me)
This commit is contained in:
committed by
Alexis de Lattre
parent
c19bb72c31
commit
07d5a29dbb
@@ -144,9 +144,7 @@ class ReportIntrastatCommon(models.AbstractModel):
|
||||
def send_reminder_email(self, mail_template_xmlid):
|
||||
mail_template = self.env.ref(mail_template_xmlid)
|
||||
if self.company_id.intrastat_remind_user_ids:
|
||||
self.pool['email.template'].send_mail(
|
||||
self._cr, self._uid, mail_template.id, self.id,
|
||||
context=self._context)
|
||||
mail_template.send_mail(self.id)
|
||||
logger.info(
|
||||
'Intrastat Reminder email has been sent (XMLID: %s).'
|
||||
% mail_template_xmlid)
|
||||
|
||||
Reference in New Issue
Block a user