Skip to content
Health
68/100
fair
  • Security25/25
    No findings
  • Activity0/25
    Last human commit 119 months ago
  • Required by25/25
    22 modules depend on it
  • Maturity18/25
    In 3 Odoo series since 6.1

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
22
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
1.36 MB
Module directory on disk
Code analysis 20 migration notes 2 models 8 views 0 HTTP endpoints

Description

Email Templating (simplified version of the original Power Email by Openlabs).

Lets you design complete email templates related to any OpenERP document (Sale Orders, Invoices and so on), including sender, recipient, subject, body (HTML and Text). You may also automatically attach files to your templates, or print and attach a report.

For advanced use, the templates may include dynamic attributes of the document they are related to. For example, you may use the name of a Partner's country when writing to them, also providing a safe default in case the attribute is not defined. Each template contains a built-in assistant to help with the inclusion of these dynamic values.

If you enable the option, a composition assistant will also appear in the sidebar of the OpenERP documents to which the template applies (e.g. Invoices). This serves as a quick way to send a new email based on the template, after reviewing and adapting the contents, if needed. This composition assistant will also turn into a mass mailing system when called for multiple documents at once.

These email templates are also at the heart of the marketing campaign system (see the marketing_campaign application), if you need to automate larger campaigns on any OpenERP document.

**Technical note:** only the templating system of the original Power Email by Openlabs was kept.

Dependencies

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 8

XML IDNameModelTypeStatus
email_compose_message_wizard_inherit_form mail.compose.message.form mail.compose.message form Inherits mail.email_compose_message_wizard_form
email_template_form email.template.form email.template form New
email_template_preview_form email_template.preview.form email_template.preview form New
email_template_tree email.template.tree email.template tree New
res_partner_opt_out_form res.partner.opt_out.form res.partner form Inherits base.view_partner_form
res_partner_opt_out_search res.partner.opt_out.search res.partner search Inherits base.view_res_partner_filter
view_email_template_search email.template.search email.template search New
view_server_action_form_template ir.actions.server.form ir.actions.server form Inherits base.view_server_action_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 2

New fields (0)

No new fields.

Public methods (2)
  • on_change_template_id(self, cr, uid, ids, template_id, context=None)
    Render the raw template in the server action fields.
  • run_action_email(self, cr, uid, action, eval_context=None, context=None)

New fields (0)

No new fields.

Public methods (8)
  • default_get(self, cr, uid, fields, context=None)
    Override to pre-fill the data when having a template in single-email mode and not going through the view: the on_change is not called in that case.
  • generate_email_for_composer(self, cr, uid, template_id, res_id, context=None)
  • generate_email_for_composer_batch(self, cr, uid, template_id, res_ids, context=None, fields=None)
    Call email_template.generate_email(), get fields relevant for mail.compose.message, transform email_cc and email_to into partner_ids
  • onchange_template_id(self, cr, uid, ids, template_id, composition_mode, model, res_id, context=None)
    - mass_mailing: we cannot render, so return the template values - normal mode: return rendered values
  • render_message_batch(self, cr, uid, wizard, res_ids, context=None)
    Override to handle templates.
  • render_template_batch(self, cr, uid, template, model, res_ids, context=None, post_process=False)
  • save_as_template(self, cr, uid, ids, context=None)
    hit save as template button: current form value will be a new template attached to the current document.
  • send_mail(self, cr, uid, ids, context=None)
    Override of send_mail to duplicate attachments linked to the email.template. Indeed, basic mail.compose.message wizard duplicates attachments in mass mailing mode. But in 'single post' mode, attachments of an email template also have to be duplicated to avoid changing their ownership.

Loading…

Loading…