How it works...

In steps 1 to 3, we create a normal manual email.

Step 4 creates a new email template from the text we typed. If you need to always send the same message, without any placeholder values you can stop there. However, you will often want to customize the message a bit.

In steps 5 and 6, we insert a placeholder to get the name of the member inside the mail rather then hard-coding it. Placeholders use the ${object.field_name} syntax.

Historically, mail templates were formatted using Mako templates ( It turns out that this was posing a security risk by allowing to execute arbitrary user-supplied Python code when formatting the emails, so now the templates still use a trimmed down version of the Mako ...

Get Odoo 11 Development Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.