Get in touch
⌘K

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.

Email Template
Invoices
Automation
Mail Template

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

FieldsTrường dữ liệuDescription
Product Email TemplateMẫu email sản phẩmThe product.template field that points to a mail.template record.
Automatic Email at InvoiceEmail tự động khi xuất hóa đơnSection on the product form used to assign the auto-send template.
Email TemplateMẫu emailThe mail template triggered by an invoice containing that product.
BodyThânThe 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

ConditionMeaningIf missing
move_type = out_invoiceOnly customer invoices are targetedNo send for vendor bills or refunds
Invoice postedSend happens only after validationDraft invoices do not trigger automation
Product has email templateThe product must reference a mail templateThat invoice line is skipped
Customer has valid mail contextThere must be a usable recipient path in the mail flowPartner 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

VariableMeaningTypical use
${object.name}Invoice numberReference it in the subject or confirmation body
${object.partner_id.name}Customer namePersonalize the greeting
${object.invoice_date}Invoice dateRepeat the transaction timing
${object.amount_total}Invoice totalSummarize the invoice value
${object.company_id.name}Company nameSign off or identify the sender

Real-world use cases

Example implementations by product type

Product typeEmail contentOperational value
Training courseCourse materials, schedule, meeting link, instructor infoReduces manual post-sale follow-up
Software / LicenseLicense key, activation guide, download linkFast and consistent digital fulfillment
Consulting serviceReports, reference material, follow-up scheduleStandardizes post-delivery communication
Warranty productUsage guide, warranty policy, support hotlineImproves 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.