I want to send RFQ to vendor of purchase order by code my code is as below
@api.multi
def send_mail(self,purchase_id):
email_template_obj = self.env['mail.template']
template_ids = email_template_obj.search([('name','=','RFQ - Send by Email'),('model_id.model', '=', 'purchase.order')]) values={}
if template_ids:
email=self.env['mail.template'].browse(template_ids.id).send_mail(purchase_id) self.env['mail.mail'].browse(email).send()
return True
This code send email to vendor as like below attachment.
https://gyazo.com/4c29e8ae42b9c92bb18a538a056c1782
I want emai like as below image,when i send rfq by button "send RFQ by mail" of purchase order.I need email body should be like below image when i am sending email from code
https://gyazo.com/8919f9a0807b2e74c024c004e3bc5e72