Repository
OCA/social · module folder · Try on Runboat
Module version
1.0.3
Category
Social Network
Folder size
0.07 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/social
Last tracking update
2026-08-07 07:17:49
Authors
Odoo Community Association (OCA), Compassion CH
Maintainers
Odoo Community Association (OCA), Compassion CH
Committers
Ronald Portier, Holger Brunn, Pedro M. Baeza, GitHub, Thierry Ducrest, Emanuel Cino, OCA-git-bot, oca-travis
Odoo dependencies
OCA/social:
odoo/odoo:
- web
- bus
Python dependencies
sendgrid
System dependencies
None
Required by
mail_sendgrid_mass_mailing
Description

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
email_compose_message_sendgrid_form mail.compose.sendgrid.form mail.compose.message form Inherits mail.email_compose_message_wizard_form
email_form_view mail.mail.sendgrid mail.mail form Inherits mail.view_mail_form
sendgrid_email_search_view mail.mail.sendgrid.search mail.mail search Inherits mail.view_mail_search
sendgrid_email_tree_view mail.mail.sendgrid.tree mail.mail tree Inherits mail.view_mail_tree
view_email_template_sendgrid_form sendgrid.sendgrid.form mail.template form Inherits mail.email_template_form
view_sendgrid_substitution_line_tree sendgrid.substitution.tree sendgrid.substitution tree New
view_sendgrid_template_form sendgrid.template.form sendgrid.template form New
view_sendgrid_template_tree sendgrid.template.tree sendgrid.template tree New
HTTP endpoints (1)
Route(s)HandlerAuthTypeMethodsFlags
/mail/tracking/sendgrid/<string:db> SendgridTrackingController.mail_tracking_sendgrid none json ALL csrf off
Models touched (10)

New fields (0)

No new fields.

Public methods (1)
  • on_change_res_id(self)
    @api.onchange('res_id')@api.multi

New fields (1)
  • body_sendgrid Html
    compute='_compute_sendgrid_view'
Public methods (1)
  • get_mail_values(self, res_ids)
    @api.multi
    Attach sendgrid template to e-mail and render substitutions

New fields (4)
  • click_count Integer
    compute='_compute_tracking' readonly=True store=True
  • opened Boolean
    compute='_compute_tracking' readonly=True store=True
  • tracking_email_ids One2many → mail.tracking.email
    readonly=True string='Registered events' args: 'mail.tracking.email', 'mail_id'
  • tracking_event_ids One2many → mail.tracking.event
    compute='_compute_events' args: 'mail.tracking.event'
Public methods (2)
  • send(self, auto_commit=False, raise_exception=False)
    @api.multi
    Override send to select the method to send the e-mail.
  • send_sendgrid(self)
    @api.multi
    Use sendgrid transactional e-mails : e-mails are sent one by one.

New fields (5)
  • body_text Text
    help='Text only version of the body'
  • send_method Char
    compute='_compute_send_method'
  • sendgrid_template_id Many2one → sendgrid.template
    args: 'sendgrid.template', 'Sendgrid Template'
  • sent_date Datetime
    copy=False
  • substitution_ids Many2many → sendgrid.substitution
    copy=True string='Substitutions' args: 'sendgrid.substitution'
Public methods (0)

No public methods.

New fields (3)
  • sendgrid_localized_template Many2one → sendgrid.template
    compute='_compute_localized_template' args: 'sendgrid.template'
  • sendgrid_template_ids One2many → sendgrid.email.lang.template
    args: 'sendgrid.email.lang.template', 'email_template_id', 'Sendgrid Templates'
  • substitution_ids One2many → sendgrid.substitution
    args: 'sendgrid.substitution', 'email_template_id', 'Substitutions'
Public methods (2)
  • render_substitutions(self, res_ids)
    @api.multi
    :param res_ids: resource ids for rendering the template Returns values for substitutions in a mail.message creation :return: Values for mail creation (for each resource id given) {res_id: list of substitutions values [0, 0 {substitution_vals}]}
  • update_substitutions(self)
    @api.multi

New fields (1)
  • click_count Integer
    compute='_compute_clicks' readonly=True store=True
Public methods (1)
  • event_process(self, request, post, metadata, event_type=None)
    @api.model

New fields (0)

No new fields.

Public methods (1)
  • process_sent(self, tracking_email, metadata)
    @api.model

New fields (3)
  • email_template_id Many2one → mail.template
    args: 'mail.template', 'E-mail Template'
  • lang Selection
    required=True args: '_select_lang', 'Language'
  • sendgrid_template_id Many2one → sendgrid.template
    required=True args: 'sendgrid.template', 'Sendgrid Template'
Public methods (0)

No public methods.

New fields (5)
  • email_id Many2one → mail.mail
    index=True ondelete='cascade' args: 'mail.mail'
  • email_template_id Many2one → mail.template
    index=True ondelete='cascade' args: 'mail.template'
  • key Char
  • lang Char
  • value Char
Public methods (0)

No public methods.

New fields (5)
  • detected_keywords Char
    compute='_compute_keywords'
  • html_content Html
    readonly=True
  • name Char
  • plain_content Text
    readonly=True
  • remote_id Char
    readonly=True
Public methods (2)
  • get_keywords(self)
    Search in the Sendgrid template for keywords included with the following syntax: {keyword_name} and returns the list of keywords. keyword_name shouldn't be longer than 50 characters and not contain whitespaces. You can replace the substitution prefix and suffix by adding values in the system parameters - mail_sendgrid.substitution_prefix - mail_sendgrid.substitution_suffix
  • update_templates(self)
    @api.model