hi im trying to create a send email button but when i click it it doesnt send it immediately i check email menu on technical and emails are in outgoing stage
i have already configured outgoing email
this is my code:
def action_send_email_qs(self):
template = self.env.ref("sale_modify.email_template_quote")
for rec in self:
if rec.partner_id.email:
email_values = {'subject': 'Test OM'}
template.send_mail(rec.id, force_send=True)
help me plz and I will mark your answer as correct!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
Hi,
You can try this method.
def action_send_email_qs(self):
template = self.env.ref('sale_modify.email_template_quote')
for rec in self:
if rec.partner_id.email:
template.send_mail(self.id, force_send=True,
email_values={
'email_to': rec.partner_id.email,
'subject': 'Test OM'
})
Regards
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Jun 22
|
3770 | ||
|
1
Jan 22
|
2269 | ||
|
2
Aug 23
|
2021 | ||
|
2
May 23
|
2191 | ||
|
1
Apr 23
|
2348 |