-
- Downloads
[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>
Showing
- addons/mail/models/__init__.py 1 addition, 0 deletionsaddons/mail/models/__init__.py
- addons/mail/models/mail_render_mixin.py 68 additions, 0 deletionsaddons/mail/models/mail_render_mixin.py
- addons/mail/models/mail_template.py 1 addition, 50 deletionsaddons/mail/models/mail_template.py
- addons/mass_mailing/models/mailing.py 2 additions, 2 deletionsaddons/mass_mailing/models/mailing.py
- addons/mass_mailing/views/mailing_mailing_views.xml 13 additions, 0 deletionsaddons/mass_mailing/views/mailing_mailing_views.xml
- addons/sms/models/sms_template.py 1 addition, 55 deletionsaddons/sms/models/sms_template.py
Loading
Please register or sign in to comment