Send an email using a template

Create a function in your model:

def send_email_notification(self):
    ir_model_data = self.env['']
    template_obj = self.env.ref('abc.email_template')
    template_obj.send_mail(self.ids[0], force_send=True)
    return True

call the function by the following XML code:

<button name="action_email_notification" string="Send Email Notification" type="object" class="oe_highlight" />

Leave a Reply

Your email address will not be published. Required fields are marked *