summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/wizard
AgeCommit message (Collapse)Author
2019-04-09[MERGE] forward port branch 12.0 up to ea1fc124efcChristophe Simonis
2019-04-08[FIX] mass_mailing: correctly find partner email in mass mailingThibault Delavallée
In mass mailing access to partners when performing a mass mailing has been done in batch to speedup computation [1]. Emails are put into a dictionary allowing to find back the email based on partner_id. However the matching between the partner and its emails is done using a shortcut using the current document ID as partner ID. It works when performing a mass mailing on partners but fails when performing a mass mailing on models having message_get_default_recipients not returning only emails. Currently in saas-14 main models return only emails (crm, event, mailing contacts) but other models may encounter issues (applicants, tickets). This commit fixes it by correctly matching partner id and its found email. Related to task ID 1924711 Linked to PR #32496 [1] See 65ed4553a50fdbefc986b7d21f87a81c42b743c7
2018-11-20[IMP] mass_mailing : apply email_normalized on _get_opt_out_listDavid Beguin
To avoid sending mail to an opted-out mass_mailing_contact with email address that is not strictly an email address (a <a@a.com> instead of a@a.com), the the get_opt_out method must be adapted to use the email_normalized field, as this method is only useful for that specific model. Task ID : 1896677
2018-11-15[IMP] mass_mailing: improve onboardingGeoffroy Larue
Purpose : this commit improve various elements of the mass mailing interface : - make recipients field in mass mailing form required and add "mass mailing contact" in selection - new "Archive" button and color picker in dropdown menus of mailing lists and mailings kanban views. - various little improvements in labels closes odoo/odoo#28497
2018-09-21[IMP]marketing: Improvement in model descriptionNimesh Jethva
Purpose of this commit is to give description more "business oriented" because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers. Related Task ID : 37311
2018-08-10[IMP] mass_mailing : include invalid emails into ignored stateDavid Beguin
If the email is invalid (incorrect pattern), the mailing status is set to canceled and will be flaged as ignored in the mail.mail.statistics
2018-08-10[IMP] mail : auto-blacklist rule when too much email bouncedDavid Beguin
In order to avoid sending mail indefinitely to a wrong email address, Take the mail statistics for the recipient of the last 3 month : if more than 5 mails bounced (with interval of more than 1 week) the email is blacklisted.
2018-08-10[IMP] mail, mass_mailing : apply blacklist, opt_out per mailing listDavid Beguin
Purpose ======= - Apply the blacklist implementation to Improve mailing subscription to be more compliant with the European GDPR law. Keep a list of people who does not want to receive promotional emails (or mass mailing in general) anymore. - Allows the recipient to update himself his mailing preferences Specifications =========== This commit is regrouping some main changes on mass mailing. Apply Blacklist for following models through blacklist.mixin : - crm.lead - res.partner - mail.mass_mailing.contact - mail.channel.partner - Opt_out per mailing list instead of per mailing contact. - Replace opt_out by blacklist in crm.lead + res.partner models - Added 'ignored' state for mass_mailing. Ignored = blacklisted, opted-out Ignored email are not included into final statistics to avoid confusion. - Unsubscribe(d) pages migrated from website_mass_mailing to mass_mailing module as thoses pages should work without having the website module installed Detailed implementation =================== Mass-mailing : - A blacklisted email is notified by the ban icon next to the email field. (at the left of the email field for display purpose) - Renaming the '_get_blacklist' method that was actually searching opt_out list into 'get_opt_out_list' - Opt out per mailing list : Add opt_out + related fields (for display and ergonomy reasons) on the relational model - Display relational model tree view instead of mass_mailing.contact tree view when clicking on mass_mailing_list in kanban view -> In order to be align between contact_nbr displayed in kanban tile and the content of the tree view -> mass_mailing contact is accesible via the user icon in this tree view - Remove custom filters 'filter_contact_subscription' and 'filter_contact_unsubscription' as opt_out is not on mass_mailing.contact model anymore - Add 'is_public' to mailing list The name of this mailing list can be seen (or not) by recipient in the unsubscription page If the mailing lists used in the mass mailing are not public, the user in only informed that he has been unsubscribed. If the mailing lists are public, the user is informed that he has been unsubscribed from the mailing lists and he has the choice to modify his subscription to all the public mailing list he is or was subscribed to. - Unsubscription Page : - mass_mailing_contact : Opt_out per mailing list, done by email and not by id, as multiple contact can have the same email The recipient can add/remove himself to/from the blacklist The recipient can send a feedback about why he unsubscribed - crm.lead + res.partner : Once the recipient unsubscribe, he is automatically blacklisted The recipient can 'Come back' and remove himself from the blacklist if he changes his mind - Show blacklist button parameter added in config : The idea is to enable/disable the fact that the recipient can add himself to the blacklist by showing or not the 'blacklist me' button Only applies for mass_mailing.contact. The recipient, once blacklisted, can always, no matter the value of this parameter, 'come back' and unblacklist himself crm.lead + res.partner : - Replace opt_out by blacklist in crm.lead + res.partner models. As when a res.partner or crm.lead unsubcribe, we assume that the recipient does not want to receive mass mailing anymore, at all, even if we adds him to a mailing list afterwards. He is then blacklisted to avoid this. With this behaviour, if a new lead is created with the same email address, he won't be able to receive mail in mass_mode. But he will still be able to receive '1 to 1' direct email. Task ID 33224 Closes #25966
2018-08-10[IMP] mail - mail.blacklist: Not send mass_mail to recipient that does't want toDavid Beguin
Purpose ======= Improve mailing subscription to be more compliant with the European GDPR law. Keep a list of people who does not want to receive promotional emails (or mass mailing in general) anymore. Specifications =========== This commit is regrouping some main changes on mass mailing. - Added blacklist : Avoid sending mass mailing to blacklisted recipient (blacklisted = email address that doens't want to receive mass mailing anymore) Detailed implementation =================== Mail : - Add Blacklist mechanism in mail module (NOT in mass-mailing) : as we can send mass-mail without the mass-mailing module - Unicity in email -> To avoid error in import, override the create and return the existing record if any, else, create the record normally. - Blacklisting is done by email address and is cross model. Will apply to model that inherit the blacklist.mixin. - field 'is_blacklisted' -> computed : check if email is in blacklist + search method to be able to filter on is_blacklisted - When a email address is blacklisted, it will never get mass mailings anymore. Even if the email address is added to another mailing lists - Avoid sending notification to blacklisted recipients when sending email in mass mail mode. If the recipient is blacklisted, we should not even send a notification in the recipient's chatter for an email that he won't even receive. - When a email address is blacklisted, it can still get 'normal' mailings. - The blacklist shoud be accessible in Mass Mailing / Configuration / Blacklist and Settings / Technical / Email / Blacklist -> Renaming Settings / Technical / White / Black List config menu item into Channel Moderation to avoid confusion with Mass Mail Blacklist - Add indexes to the blacklist table (on email) to make it fast for access for the different use cases - _primary_email : attribute that must be overriden to specify which field must be used as email in the blacklist mechanism. - Filtering the blacklisted recipient in mail composer : done in mail._get mail value() In case of real mass mailing, we need the statistics to be computed in order to know how many recipients were ignored in the mail. So we cannot avoid sending mail but instead flag the mail as canceled. Task ID 33224
2018-08-06[IMP] mass_mailing, mail: added support for media queries in mass mailDeep Patel
- Email generated from mass mailing will have its own layout with internal css. - strip_classes is removed from mail_message because mail client are now supporting internal stylesheet. we need it for make mail responsive. mail: manually removed classes from incoming mail body Because we removed strip_classes from mail message body field because we want to allow classes in outgoing mail to make it responsive but classes are not removed from incoming mails so here we manually removed classes from incoming mail. opw-1836556
2018-07-27[REF] *: BS4, rename btn-default to btn-secondaryqsm-odoo
BS4 "btn-default" class was replaced with "btn-secondary", which makes more sense.
2018-05-25[IMP] mass_mailing: add schedule button that opens a wizard for scheduling datedip-odoo
Purpose of this commit is to re-arrange mass mailing buttons and to add a button for scheduling mass mailing in future : * add schedule date in debug mode; * re-arrange all button; * add schedule in future button and on click open wizard to schedule future date; * on 'send now' button remove the useless '|' in domain; * add a small wizard to select the send date; This commit is related to task ID 46932
2018-04-18[MERGE] forward port branch 11.0 up to 8c64159b884Christophe Simonis
2018-04-18[MERGE] forward port branch saas-15 up to 16ec176620eChristophe Simonis
2018-04-18[MERGE] forward port branch 10.0 up to 2f037a13ca3Christophe Simonis
2018-04-17[FIX] mass_mailing: sanitize test emailNicolas Martinelli
When sending the test email of a mass mailing campaign, it might be observed that the result is different from the final email sent to customers. This is because the `body` field of the final mail message is an `Html` field with options `sanitize_style=True` and `strip_classes=True`. On the other hand, the `body_html` field the test mail is a simple `Text` field which is not sanitized. We sanitize the `body_html` field with similar options. opw-1820064
2018-02-12[FIX] mail: replace local links in notification emailsThibault Delavallée
Since notification emails are not mail templates anymore they do not go through the mail_template.render_post_process() method that converts local links to absolute links. This means that buttons and images were not correctly displayed in notification emails. Indeed those still had local links. This commit fixes that by moving the method directly in mail.thread and calling it accordingly when rendering the notification email. Note that the method has been changed in order to use regex instead of html parser. It is done based on work already done in mass mailing application. Indeed using parsers is complex and time consuming and may create changes in the html structure that are not intended. Next step in master is to go through various link modifications in mass mailing module to see how to handle them properly. Maybe.
2018-01-04[IMP] mail,mass_mailing: changed duplicate field label in the same modelKinjal Mehta
2017-10-23[IMP] mass_mailing: Add the possibility to merge mailing listsYannick Tivisse
Purpose ======= Mailing lists are not flexible. It should be possible to merge mailing lists and remove duplicates when doing it. Specification ============= - When selecting records, in the action menu, add "Merge selected mailing lists" - A modal will open : - There's the choice between merging the contacts into a new mailing list or an existing one - There's the choice to archive the source mailing lists or not - The duplicates are avoided in the destination mailing list - Opt-out contacts are not copied in the destination list
2017-09-21[FIX] performance: use `IrModel._get` instead of searchRaphael Collet
2017-09-15[IMP] mass_mailing: choose model among all chatter modelsYannick Tivisse
This commit removes the strange selection box based on a magic flag and some strange methods returning a string. Instead just allow to send mass mailing on all models inheriting from mail.thread using the is mail thread flag. Various addons are updated to remove the _mail_mass_mailing class attribute used to determine mass mailing capability. We consider people could send a mass mailing on every model inheriting from mail.thread. It makes no sense to limit it to a given set of addons.
2017-05-05[MERGE] forward port branch saas-15 up to c0e4ab80804Christophe Simonis
2017-05-04[FIX] mass_mailing: send mail to partner without emailPierre Masereel
When you send a mass mailing to muiltiple partner, if some of them have no email adresse, it can lead to errors because of the variable 'recips' is not set if the first occurence in the 'for loop' has no email. To fix this, we always set the variable 'recips' by replacing the 'elif' close by a 'else' one introduced in rev: https://github.com/odoo/odoo/commit/65ed4553a50fdbefc986b7d21f87a81c42b743c7
2017-05-03[FIX] mass_mailing: make blacklist and seenlist work with res_partnerLucas Perais (lpe)
Before this commit, the filtering brought by commit ca989b6 did not work when no email_to was present. Which is the case for mass-mailings based on res.partner records. OPW 728321 Closes #16745
2017-04-28[FIX] Various P3-related import changesxmo-odoo
* LDAP import: python-ldap is not python3-compatible, pyldap is Warning: only supported from debian Stretch (current testing)? https://packages.debian.org/search?searchon=names&keywords=pyldap * implicitly relative imports * imports of moved or removed stdlib modules issue #8530
2017-03-27[FIX] mass_mailing: prevent duplicates and sending to opted-outOlivier Dony
The mass-mailing App suffered from severe issues due to its inability to detect and handle duplicates "at the email level", and the absence of any global blacklist system, leading to lack of user trust. Mailing-lists typically include multiple records with the same email, and it is critical to avoid sending them the same email several times. A related problem is the unsubscription of an email that is present in other records (duplicates). Opting out the first email should automatically blacklist it for other records as well. Ideally we should have a global blacklist table in order to share the unsubscription requests globally across models (Leads, Partners, Mailing-list contacts). It would also allow importing it from other blacklist systems. (TODO for master) This commit introduces a partial solution, made of several small changes: - In mail.mail: double-check that an outgoing email has the correct status (`outgoing`) before sending it. This allows adding emails in the queue and cancelling them before they actually get sent. - In crm.lead: force predictable recipients for mass-mailing, by always using the email of the lead rather than the email of the linked partner when there is one. This simplifies the computation of the blacklist and seen list. Other areas in the codebase already assume as much. - In mass.mailing: + Before sending out a mailing-list batch, compute the blacklist (all opted-out emails) and the seen_list (emails who previously received this mail) to make sure we only ever target valid recipients. + While delivering the mass-mailing, any email targeting an address that is in the blacklist or "seen list" is canceled before being sent. The corresponding statistics entry is considered "not delivered". Also updates the "seen list" continuously. + When a mass-mail belongs to a campaign with the "unique AB/B testing" flag, the "seen list" is common to the whole campaign, as an extra safety. + Auto-delete mass-mailing test messages sent with the test wizard, to avoid polluting the mail_mail table Note: this fix uses a simple regex for efficiently extracting the blacklist in pure SQL from different models, and doing so, assumes that each record only holds a single email (no comma-separated adresses). This should be sufficient for most cases. The regex: ([^ ,;<@]+@[^> ,;]+)
2017-01-27[MERGE] forward port branch saas-11 up to e86983112ebChristophe Simonis
2017-01-27[MERGE] forward port branch saas-6 up to f8b82bdd63aChristophe Simonis
2017-01-27[MERGE] forward port branch 8.0 up to f431cee99a8Christophe Simonis
2017-01-26[FIX] mass_mailing: ondelete cascade on transientAdrien Peiffer (ACSONE)
The test wizard will be dropped eventually but it is not possible to delete the mass-mailing before the transient is cleaned too due to the required field. To make it faster, add a ondelete cascade on the field. Closes #15217
2016-11-17[FIX] mass_mailing: remove unsubscribe link from test mailingqsm-odoo
When using the "Test Mailing" button, a sample mail was sent to a particular mail address and a text-like unsubscribe link was added below the mail body. This link was ugly, ununderstandable and useless as it is test mailing anyway. To add unsubscribe links to your mail body, use the footer blocks which contain this kind of link (note: they are inserted by default in all mail templates).
2016-06-17[FIX] mass_mailing: Append unsubscribe url to mail bodyYannick Tivisse
2016-06-17[MIG] mass_mailing: code migration to new apiKeyur Gajjar
NB: A controller in website_mass_mailing has been migrated too. It's not a real issue as this module will also be migrated in the days to come
2016-06-17[MOV] mass_mailing: splitted the following files + new apiKeyur Gajjar
1. Splitted data/mass_mailing_data.xml to security/mass_mailing_security.xml for res_groups data. 2. Splitted views/mass_mailing_views to - views/link_tracker_views.xml - views/mass_mailing_stats_views.xml - views/mass_mailing_template.xml
2016-06-17[MOV] mass_mailing: directory restructuring according to new apiKeyur Gajjar
2015-12-08[MERGE] forward port of branch saas-6 up to 12d7996Christophe Simonis
2015-12-01[FIX] mass_mailing: unsubscribe link when testing the mailingDenis Ledoux
When testing a mass mailing before sending the mailing to the contacts (which well, is always the case), the local links were not replaced by absolute links, and the override done on the method `send_get_email_dict` to convert the link `/unsubscribe_from_list` to the actual unsubscription link was not working, as it relied on the absolute link. opw-657982
2015-08-24[MERGE] forward port of branch saas-6 up to e16d495Christophe Simonis
2015-08-21[MERGE] forward port of branch 8.0 up to 86f98d5Christophe Simonis
2015-08-19[IMP] *: Uniformize all modal footersRonak Baxi
The main button has classnames btn btn-primary. Other buttons have classnames btn btn-default. No more 'or' between the buttons.
2015-08-14[FIX] mass_mailing: add attachment in mass mailing testDenis Baranov
When testing the mass mailing, with the 'Test Mailing' button, the attachments were just not attached. Closes #2981
2015-04-27[MIGR] mail: migration to the new APIThibault Delavallée
2015-01-07[IMP] Mass mailings send in cronJulien De Coster
1. The merge of the "email_template" module into the "mail" module. 2. The send action of the mass mailing has been moved from the frontend to a cron, because it was too slow to send over 10,000 mails (the user's browser was blocked for 15 - 20 minutes). Mass mailings have now their own process in the kanban view. 3. Mails sent from the mail form are sent immediatly instead of from the mail queue (for instance, when you go to sales > customers > list view > select 2 -3 customers > More > Partner Mass Mailing). 4. Users have now the choice from which mailing list they want to unsubscribe when they click on the unsubscribe link at the bottom of the mail. 5. Mass mailings inherit from their campaign UTMs and mass mailing campaigns are linked to an UTM campaign. 6. Many little improvements
2014-10-02[IMP] mass_mailing: option to keep sent emailsBhavik Bagdiya
2014-08-26[IMP] Cleaning of reporting (group_by, filters), adding new favourites and ↵qdc
default views, some renaming (py and xml files)
2014-08-21* [8.0][mass_mailing] some fixesOlivier LAURENT
* [FIX] rename wrong mailing_type field and add missing fields when creating a mass mailing from the composer * [FIX] coerce tooltip to an unicode string to avoid a json crash when locale produces a non unicode string for strftime(%B) * [FIX] repair wrong sql statement computing statistics
2014-06-12Removed version="7.0" from form viewsFabien Meghazi
2014-06-02[FIX] mass_mailing: fixes:Thibault Delavallée
- fixed keeping the original message for routing, only when choosing to reply in the original thread (notification=True) - auto delete sent emails explicitely - mail_thread: routing: fixed replies always choosen even when replying to emails with a specified reply_to (using ref_match in the algorithm) - mail_thread: routing: instead of exclusive routing heuristics, use each case as a fallback of the previous.
2014-04-17[FIX] mass_mailing: fixed test mailing wizard, still using unsubscribe url ↵Thibault Delavallée
that is now delegated on the mail_mail model. bzr revid: tde@openerp.com-20140417122633-bej72c8yhv2y2y4z
2014-04-15[IMP] mail, mass_mailing: better recipientsz computationThibault Delavallée
for mass mailing, composer and template. This allows to have one method computing recipints and avoid repetiting myself. bzr revid: tde@openerp.com-20140415154700-zu2izvxfjq1k4h4a