Odoo Help

Welcome!

This community 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.

0

Object reference for email templates for email notification

By
Chris
on 11/20/16, 10:25 PM 94 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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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