Product email templates
Automatically send product-specific customer emails after sales invoices are validated, so materials, instructions, or after-sales information are delivered consistently.
The product_email_template module lets you attach a mail template directly to a product. When a sales invoice is validated, Odoo scans invoice lines for products with a configured template and sends the matching emails automatically.
This pattern works well for digital products, training services, consulting deliverables, or any item that requires immediate follow-up information after revenue recognition.
When to use it
Key points
• Send course material or schedules after a customer is invoiced.
• Deliver activation instructions, license keys, or download links for software and digital products.
• Send reports, references, or follow-up scheduling for consulting services.
• Provide warranty details, usage guidance, or after-sales support information for special products.
Main fields and concepts
| Fields | Trường dữ liệu | Description |
|---|---|---|
| Product Email Template | Mẫu email sản phẩm | The product.template field that points to a mail.template record. |
| Automatic Email at Invoice | Email tự động khi xuất hóa đơn | Section on the product form used to assign the auto-send template. |
| Email Template | Mẫu email | The mail template triggered by an invoice containing that product. |
| Body | Thân | The main email content, usually in HTML. |
Assigning a template to a product
Key points
• Each product usually points to one primary follow-up template.
• The email content should match the post-invoice stage of the process and should not assume later logistics steps have already happened unless that is guaranteed operationally.
Steps
1. Go to Inventory → Products → Products.
2. Open the product that should trigger automatic email delivery or create a new one.
3. Find the Automatic Email at Invoice section on the product form.
4. Select the appropriate Email Template from the available mail templates.
5. Save the product so the configuration becomes active.
Automatic email flow on invoice validation
Steps
1. Create a Customer Invoice and add the required invoice lines.
2. Make sure the products on those lines have email_template_id configured.
3. Validate the invoice so it becomes posted.
4. The system checks eligible invoice lines and sends one email per product template found.
5. Sent messages are stored in the invoice chatter for auditability.
Conditions required for sending
| Condition | Meaning | If missing |
|---|---|---|
| move_type = out_invoice | Only customer invoices are targeted | No send for vendor bills or refunds |
| Invoice posted | Send happens only after validation | Draft invoices do not trigger automation |
| Product has email template | The product must reference a mail template | That invoice line is skipped |
| Customer has valid mail context | There must be a usable recipient path in the mail flow | Partner or mail setup may need review |
Building an effective mail template
Steps
1. Go to Settings → Technical → Email → Templates.
2. Create a new template with Applies to set to Invoice (account.move).
3. Set the Subject and Body to match the type of product being delivered.
4. Configure Email From, Reply To, and attachments if needed.
5. Test the template with sample invoice data before attaching it to many products.
Common dynamic variables
| Variable | Meaning | Typical use |
|---|---|---|
| ${object.name} | Invoice number | Reference it in the subject or confirmation body |
| ${object.partner_id.name} | Customer name | Personalize the greeting |
| ${object.invoice_date} | Invoice date | Repeat the transaction timing |
| ${object.amount_total} | Invoice total | Summarize the invoice value |
| ${object.company_id.name} | Company name | Sign off or identify the sender |
Real-world use cases
Example implementations by product type
| Product type | Email content | Operational value |
|---|---|---|
| Training course | Course materials, schedule, meeting link, instructor info | Reduces manual post-sale follow-up |
| Software / License | License key, activation guide, download link | Fast and consistent digital fulfillment |
| Consulting service | Reports, reference material, follow-up schedule | Standardizes post-delivery communication |
| Warranty product | Usage guide, warranty policy, support hotline | Improves after-sales experience and reduces repetitive support questions |
Important operating notes
Key points
• If an invoice contains multiple products with templates, the customer may receive multiple separate emails rather than one combined message.
• This flow targets customer invoices only and does not automatically apply to vendor bills, credit notes, or miscellaneous entries.
• Emails are logged in invoice chatter, so accounting and sales teams can review what was sent later.
• If one invoice contains many templated products, consider the impact on performance and the customer experience.
• Templates should stay concise, product-specific, and avoid repeating information already handled by the main invoice email.