Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.
Add sudo for other operations on ir.actions.*
Purpose
=======
Provide a follow-up/overview of the Mailing 24 hours after its been sent.
Specifications
==============
Send an email to the responsible of the mailing 24 hours the last email
of the mass mailing.
During the link trackers creation, extract the button label if exists
(so we can display them in the statistics email).
Technical remarks
=================
The statistics email is sent to the responsible of each mailing in the
CRON of mass mailing.
Task-2227411
closesodoo/odoo#49836
Related: odoo/upgrade#1094
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Prior to this commit, two fields were used for lead and opportunities
count.
As both of these fields were set with the same values and only existed
for labelling purposes, this commit replaces them by a single field
and handles the the labels in the xml.
This commit also improves the way lead count is computed by using
a read_group instead of a search in a loop.
LINKS:
closes odoo/odoo#38707
Taskid: 2086863
Pr: #38707
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
Rename mail.mass_mailing model to mailing.mailing. Rationale :
* mailing is now a prefix for mass mailing models;
* mailing.mailing is easier to read / find / understand;
Note that mail.mass_mailing.campaign is not updated as it is likely to be
removed soon and replaced by simple utm.campaign model.
MIGRATION
mail.mass_mailing model -> mailing.mailing
mail_mass_mailing table -> mailing_mailing
LINKS
Task ID 2037906
Preparing task ID 1997464 (SMS addition in mass mailing)
PR #34938
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.
Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
Task #1907952
Purpose
=======
The number of generated leads/opportunities from the mass mailing on the stat button should count
both active and archived leads/opportunities.
The stat buttons on mass mailing added by sales and crm apps should appear on every selected 'model'
for the recipients (a mass mailing sent to 'leads' can generate sales).
Specs
=======
Opportunity stat button:
- double check that the number is based on both leads or opportunities, active or archived
Stat buttons Leads #, Quotations #, Invoice Amount should appear on the form all the time for showcase purposes
closesodoo/odoo#29568
As CRM inherits directly of blacklist mixin, no need to re-override
the message_get_default_recipients in the bridge module.
This code was even not in the good place.
Anyway, email_normalized can be directly used in the
message_get_default_recipients override in crm module itself.
Task ID : 1915317
Related Task ID : 1896677
Closes PR #29261
Use the email_normalized from mail.address.mixin if available to get always
a normalized email address in the unsubscribe link. That allows to simplify
the search on email address in the controllers -> Check blacklist,
send feedback, etc..
Task ID 1896677
It is not necessary to limitate UTM-based statistics based on the mailing model.
Indeed a mailing on contacts could for example generate leads and sales that
people could want to see the mailing view.
Commit linked to task ID 1889754.
Purpose: better showcase the integration between email marketing and crm
application thanks to UTM links.
Specifications
* add 2 stat buttons to the mass mailing form;
* XX Leads -> redirects to lead list view (should include both types: leads
& opportunities), only visible if Leads are activated in CRM settings;
* YY Opportunities -> redirects to opportunities list view (only
opportunities);
* those stats buttons are linked to UTM trackers used in the mass mailing
itself: campaign, source and medium. Those can be configured notably using
the website_link module;
* display the stat buttons even if no data;
* update demo data;
This commit is linked to task ID 1872198 and PR #26188.