I want to send a confirmation email to my customer automatically when i click on 'confirm sale' in quotation. is it possible ??
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
hello
inherit the button and pass the context "send_email" it will automatically send the mail to customer when quotation is confirm.
for eg.
<button name="action_confirm" id="action_confirm" string="Confirm Sale" class="btn-primary" type="object" attrs="{'invisible': [('state', 'not in', ['sent'])]}" context="{'send_email': True}"/>
<button name="action_confirm" string="Confirm Sale" type="object" attrs="{'invisible': [('state', 'not in', ['draft'])]}" context="{'send_email': True}"/>
Hi,
Yes, it is possible.
You can override the action of the confirm button and do the necessary for sending the email.
class SaleOrder(models.Model):
_inherit = 'sale.order'
@api.multi
def action_confirm(self):
res = super(SaleOrder, self).action_confirm()
# do the coding here for sending the e-mail
return res
If you need to know how to send email from the code, refer to this blog: Finding and sending e-mail templates in Odoo
Also, you can check the Automated actions, activate the developer mode and navigate to Settings -> Technical -> Automation -> Automated Actions
Thanks
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
Nov 24
|
18020 | ||
|
1
Sep 23
|
1203 | ||
|
3
May 23
|
4092 | ||
|
7
Apr 23
|
47094 | ||
Barcode scanner from mobile
Solved
|
|
1
Dec 22
|
6435 |