Files
odoo_source/addons/mail/models/__init__.py
T
laa 72aa049844 [IMP] mail, mass_mailing: add dynamic placeholder mixin and use it in mailing and templates
PURPOSE

Upgrade the "mass_mailing" and "mass_mailing_sms" modules with a dynamic
placeholder generator as it already exists in "mail module" as depicted in
https://www.screencast.com/t/cnFA0gIY.

SPECIFICATIONS

As duplicated code already exists for that and that a third version of this
code has to be added, instead create a mixin for this dynamic placeholder
generator to avoid code duplication.

Thereby

  * a mail.render mixin for the dynamic placeholder generator must be
    created in mail;
  * dynamic placeholder generator code present in mail.template.py must be
    moved to that mixin and replaced by a simple inherit;
  * use the mixin in

    * mail templates: mail.template.py (mail module);
    * mass mailings: mailing.py (mass_mailing module);
    * sms templates: sms.template (mass_mailing_sms module);

In a near future, some code will be added in this mixin, notably the template
rendering that could be moved outside of mail.template core model and moved
in that rendering mixin.

LINKS

Task ID 2070612
PR #36722

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-07 16:19:37 +00:00

34 lines
934 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import mail_message_subtype
from . import mail_tracking_value
from . import mail_alias
from . import mail_followers
from . import mail_notification
from . import mail_render_mixin
from . import mail_message
from . import mail_activity
from . import mail_mail
from . import mail_thread
from . import mail_cc_mixin
from . import mail_address_mixin
from . import mail_blacklist
from . import mail_channel
from . import mail_template
from . import mail_shortcode
from . import models
from . import res_partner
from . import res_users
from . import res_company
from . import res_config_settings
from . import update
from . import ir_action_act_window
from . import ir_actions
from . import ir_attachment
from . import ir_autovacuum
from . import ir_http
from . import ir_model
from . import ir_model_fields
from . import ir_ui_view