Daily updates from Odoo
Wednesday, July 17, 2019
2 changes · master
Code cleanup and technical improvements
The mass mailing app has been reorganized and renamed to make it easier to maintain and ready for future SMS-based outreach. Campaign tracking was also corrected so each mailing gets accurate marketing source information, improving reporting reliability.
Original PR description
PURPOSE Mass mailing is currently a bit messy. As SMS will be added as a way to notify people in mass through SMS let us take this opportunity to somehow clean this application: organization, light…
PURPOSE
Mass mailing is currently a bit messy. As SMS will be added as a way to notify
people in mass through SMS let us take this opportunity to somehow clean this
application: organization, light code cleaning, model renaming.
SPECIFICATIONS
Guidelines: re-organize model files and split them according to main
models. Also reorganize views.
Move some code bits / fields declarations to reorder them. Purpose is to
make code easier to understand and find. Funny we found two override of create
that have been merged. An override of name create is not necessary considering
code was present in one of the two merged create. Make internal methods private
and rename send_mail to action_send_mail to avoid confusion with composer and
template send_mail methods.
Fix UTM management and propagation in mass mailing. Right UTM definition in
mass mailing :
* mass mailing campaign -> utm.campaign
* mass mailing -> utm.source
* "email" -> utm.medium
Therefore :
* remove campaign setting source and medium as each mailing is a source
and medium is "email";
* ensure each mailing is a separate source (otherwise name is shared);
* ensure UTM values propagate to link creation are those values and not
the one coming from the mass mailing campaign;
Rename mass mailing models. Rationale :
* remove mail prefix, as mass mailing will allow to use SMS to contact
people and will soon be less mail-dependent;
* have simpler name, easier to read, find and understand;
* mailing.list/contact/tag seems a better naming than mail.mass_mailing.
list/contact/tag;
* have a mailing prefix for all models used in mass mailing;
MIGRATION
mail.mail.statistics model -> mailing.trace
mail.statistics.report model -> mail.trace.report
mail.mass_mailing.list model -> mailing.list
mail.mass_mailing.list.merge model -> mailing.list.merge
mail.mass_mailing.contact model -> mailing.contact
mail.mass_mailing.list_contact_rel model -> mailing.contact.subscription
mail_mass_mailing_contact_list_rel table -> mailing_contact_list_rel (specific
case of a decorated m2m)
mail.mass_mailing.stage model -> mailing.stage
mail.mass_mailing.tag model -> mailing.tag
mail.mass_mailing model -> mailing.mailing
fields updated (w column change)
* link.tracker.click: mail_stat_id -> mailing_trace_id
fields updated (no column change)
* mail.mail: statistics_ids -> mailing_trace_ids
* mail.mass_mailing (mailing.mailing): statistics_ids -> mailing_trace_ids
* mail.mass_mailing.list (mailing.list): subscription_contact_ids ->
subscription_ids
LINKS
Task ID 2037906
Preparing task ID 1997464 (SMS addition in mass mailing)
PR #34938Marketing automation was updated to match the cleaned-up mass mailing application naming and tracking structure. This improves consistency across email campaign tracking and prepares the mailing tools for future SMS campaign support.
Original PR description
PURPOSE Mass mailing is currently a bit messy. As SMS will be added as a way to notify people in mass through SMS let us take this opportunity to somehow clean this application: organization, light code cleaning, model renaming. SPECIFICATIONS Update marketing automation to naming update of some method in mass mailing. Fix UTM management and propagation in mass mailing. Right UTM definition in mass mailin and marketing automation is : * marketing campaign -> utm.campaign * mass mailing -> utm.source * "email" -> utm.medium Update marketing automation model use : * mail.mail.statistics has been renamed to mailing.trace; * mail.mass_mailing.contact has been renamed to mailing.contact; * mail.mass_mailing has been renamed to mailing.mailing; LINKS Task ID 2037906 Preparing task ID 1997464 (SMS addition in mass mailing) See odoo/odoo#34938 PR #4863