Browse Source

[IMP] get email template from its xml id instead of searching the name

pull/19/head
houssine 5 years ago
parent
commit
d6c46f6c0e
  1. 2
      easy_my_coop/models/coop.py

2
easy_my_coop/models/coop.py

@ -376,7 +376,7 @@ class subscription_request(models.Model):
return res return res
def send_capital_release_request(self, invoice): def send_capital_release_request(self, invoice):
invoice_email_template = self.env['mail.template'].search([('name', '=', 'Request to Release Capital - Send by Email')])[0]
invoice_email_template = self.env.ref('easy_my_coop.email_template_release_capital', False)
# we send the email with the capital release request in attachment # we send the email with the capital release request in attachment
invoice_email_template.send_mail(invoice.id, True) invoice_email_template.send_mail(invoice.id, True)

Loading…
Cancel
Save