I created new email template.
When attendee resgistered successfully (after click 'Pay now'), odoo send mail "Payment Done" to attendee and send my new email to Admin.
Sales: Registered User Reminder
New order requires confirmation
{{ (object.order_line.event_id.create_uid.email) }} {{ (object.user_id.email_formatted or user.email_formatted) }}
Sent automatically to admin if new user registered successfully
def _send_payment_succeeded_for_order_mail(self):
""" Send a mail to the SO customer to inform them that a payment has been initiated.
:return: None """
mail_templates = [
self.env.ref('sale.mail_template_sale_payment_executed', raise_if_not_found=False), self.env.ref('pm_email_template.mail_template_data_registered_event', raise_if_not_found=False)]
for order in self:
for mail_template in mail_templates:
order._send_order_notification_mail(mail_template)
I config field email_to but it send to both Admin and Attendee. But I want new email template only send to Admin.
Please help me ...
<field name="name">Sales: Registered User Reminder</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="subject">New order requires confirmation</field>
<field name="email_to">{{ (object.order_line.event_id.create_uid.email) }}</field>
<field name="email_from">{{ (object.user_id.email_formatted or user.email_formatted) }}</field>
<field name="description">Sent automatically to admin if new user registered successfully</field>