I would like an email to be triggered to go to the lead when it comes in from our wordpress website. How do I start?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
2
الردود
3207
أدوات العرض
Hi Jacquelyn Zalar,
You have to first configure outgoing mail server of Odoo to send an email from Odoo.Then create a mail template in XML file. e.g.
<record id="email_template" model="mail.template">
<field name="name">name of template</field>
<field name="email_from">email address of sender</field>
<field name="subject">subject of email</field>
<field name="model_id" ref="base.model_ir_ui_view"/>
<field name="body_html"><![CDATA[
<p>
Your mail-content
</p>
]]></field>
</record>
Then write below python code in file where you have written code for leads
template_id = request.env['ir.model.data'].get_object_reference(your module name,mail template id(email_template))
template_obj = request.env['mail.template'].browse(template_id)
template_obj.email_to = receiver's mail address
template_obj.send_mail(page.id, force_send=True)
Hope this will helpful to you!
Thanks
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل
Checkout the automated action in Settings -> Technical -> Automation -> automated actions. You can created the trigger based on created . Next tab in 'Server actions to run'
create the email trigger.