Odoo Help


Object reference for email templates for email notification

on 11/20/16, 10:25 PM 1,065 views

On another question titled "Email notification on contact form submission," Marek Matej outlined the process below to fix the problem.

For step one, what is the actual inputs for the fields found in form?

For example,

Complete ID:    crm.field_crm_lead_contact_name

Module:    crm

External Identifier:    field_crm_lead_contact_name

Is the input ${crm.field_crm_lead_contact_name} or ${object.crm.field_crm_lead_contact_name} or ${object.crm.lead_contact_name} or something entirely different?

Marek Matej's process

the answer to your question is to trigger server action on creating new lead:
0) Preparation
    Setup and test outgoing email server
    Enable developer mode from Administrator->About-> ... Enable developer mode
1) Create notification email template: Technical->Email->Templates
    Name the new template (say my.crm.notification)
    set Applies to Lead/Opportunity. Use fields found in form (object.name, object.description, object.email_from, etc...)
    save it
2) Create server action: Technical->Actions->Server Actions
    Name it (say my.action.lead-create)
    set base model to Lead/Opportunity
    set Action to do "Send email"
    set condition "True" to allow unconditional run
    select email template you created in previous step (my.crm.notification)
    save it
3) Create automated action: Technical->Automation->Automated Actions
    name it(say my.auto-action.lead-create)
    set related document model to Lead/Opportunity
    check Active
    set sequence number to positive
    set When to run "On Creation"
    on Action tab, add your desired actions
        in this case find and select previously created my.action.lead-create
4) Set processing period: Technical->Automation->Scheduled Actions
    select "Email Queue Manager"
    set Active
    set Interval Number and Interval Unit to desired period
    save it
This should be all. Let me know if I forgot something so I can update whole process.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/20/16, 10:25 PM
Seen: 1065 times
Last updated: 11/21/16, 1:42 AM