Can someone guide me on how can I assign a Lead when a public user contacts with Contact Form and notify the sales person with an email?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
Hi Pedro,
I think you may use Automated Actions in Odoo
Goto Settings >> Technical >> Automation >> Automated Actions
Define a new rule with related document model Lead/Opportunity and then under conditions, on When to run set On creation.
Under Actions, you can assign a server action ( Create a new server action, with Base model Lead/Opportunity and action to do Send email. Then choose your email template)
So when you create a new lead, that server action will run & automatically an email notification will be sent to the assigned Salesperson.
Let me know if you need more help on this
Hi Akhil P Sivan!
That works fine but I also tried to send notification email to the user that submit the form. It worked as well but then whenever I create a lead out of contact form, it also sends a notification email to that user.
My point here is that, can we define a mail notification only for the people who submit the form?
Hi Pedro,
This will go into some XML file
<!-- Email template for ...-->
<record id="email_template1" model="mail.template">
<field name="name">Got new leads</field>
<field name="model_id" ref="crm.model_crm_lead"/>
<field name="email_from"><![CDATA[Sender Name <${(object.company_id.email or user.email)|safe}>]]></field>
<field name="email_to">${object.email_from|safe}</field>
<field name="reply_to">email@domain.com</field>
<field name="subject">Got new Leads</field>
<field name="body_html"><![CDATA[<h3>Got new Lead:</h3>
<p>Server url.</p>
<p>More text</p>]]></field>
</record>
This in to crm_lead
class Lead(models.Model):
_inherit = 'crm.lead'
@api.mode
def send_email_demo(self, id):
template = self.env['ir.model.data'].get_object('module_name', 'email_template1')
template.send_mail(id, force_send=True, raise_exception=True)
I should test this one. I already gave up on assigning them to specific user from crm team settings.
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
fiche contact adaptée a chaque pays V16
Diselesaikan
|
|
2
Jan 23
|
242 | |
|
1
Agu 17
|
4879 | ||
|
2
Okt 24
|
49 | ||
|
1
Mar 15
|
2870 | ||
|
1
Mar 15
|
7026 |