From 991736f7936fcd446aeffbb6d2ecfcef7e5b4250 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 10 Aug 2018 07:56:00 +0200 Subject: [PATCH] [MIG] mass_mailing_resend: Migration to 11.0 * Standard procedure * Adopt README by fragments * Adapt tests --- mass_mailing_resend/README.rst | 81 +++++++++++++------ mass_mailing_resend/__manifest__.py | 5 +- mass_mailing_resend/models/__init__.py | 1 - mass_mailing_resend/models/mass_mailing.py | 1 - mass_mailing_resend/readme/CONTRIBUTORS.rst | 3 + mass_mailing_resend/readme/DESCRIPTION.rst | 15 ++++ mass_mailing_resend/readme/ROADMAP.rst | 3 + mass_mailing_resend/readme/USAGE.rst | 4 + mass_mailing_resend/tests/__init__.py | 1 - .../tests/test_mass_mailing_resend.py | 7 +- 10 files changed, 86 insertions(+), 35 deletions(-) create mode 100644 mass_mailing_resend/readme/CONTRIBUTORS.rst create mode 100644 mass_mailing_resend/readme/DESCRIPTION.rst create mode 100644 mass_mailing_resend/readme/ROADMAP.rst create mode 100644 mass_mailing_resend/readme/USAGE.rst diff --git a/mass_mailing_resend/README.rst b/mass_mailing_resend/README.rst index 84deb127..e3259852 100644 --- a/mass_mailing_resend/README.rst +++ b/mass_mailing_resend/README.rst @@ -1,11 +1,30 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - ==================== Resend mass mailings ==================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github + :target: https://github.com/OCA/social/tree/11.0/mass_mailing_resend + :alt: OCA/social +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/social-11-0/social-11-0-mass_mailing_resend + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/205/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + A frequent need for users of mass mailings is to resend one mailing that has already been sent in the past to new recipients that haven't received yet that mail. But the problem is to know which are the applicable ones. @@ -15,33 +34,26 @@ the same mail 2 times for one mass mailing, and for v9, there was a trick that allows to modify the state of a mass mailing from kanban view, covering the need. -But now on v10 both status bar in form view and dragging between states in +But now since v10 both status bar in form view and dragging between states in kanban are not allowed. This module introduces a button to restart a mass mailing to draft state, allowing you to reevaluate the sending domain or list for performing again the mailing. +**Table of contents** + +.. contents:: + :local: + Usage ===== -* Go to *Mass mailing > Mailings > Mass Mailings*. +* Go to *Email marketing > Mailings > Mass Mailings*. * Click on one record that is done or create a new one and send it. * You will see a button called "Resend". * If you click on it, mass mailing will be set to Draft again. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/205/10.0 - -Bug Tracker -=========== - -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. - Known issues / Roadmap ====================== @@ -49,27 +61,44 @@ Known issues / Roadmap * Include information on the number of new recipients to be sent on the resending (through `get_remaining_recipients` method). +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Tecnativa + Contributors ------------- +~~~~~~~~~~~~ + +* `Tecnativa `_: -* Tecnativa (https://www.tecnativa.com): - * Pedro M. Baeza + * Pedro M. Baeza -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/social `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mass_mailing_resend/__manifest__.py b/mass_mailing_resend/__manifest__.py index 9e7260b6..6c6a103b 100644 --- a/mass_mailing_resend/__manifest__.py +++ b/mass_mailing_resend/__manifest__.py @@ -1,10 +1,9 @@ -# -*- coding: utf-8 -*- -# Copyright 2017 Tecnativa - Pedro M. Baeza +# Copyright 2017-2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Resend mass mailings", - "version": "10.0.1.0.0", + "version": "11.0.1.0.0", "category": "Marketing", "website": "https://github.com/OCA/social", "author": "Tecnativa, " diff --git a/mass_mailing_resend/models/__init__.py b/mass_mailing_resend/models/__init__.py index d06de603..57344fa0 100644 --- a/mass_mailing_resend/models/__init__.py +++ b/mass_mailing_resend/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import mass_mailing diff --git a/mass_mailing_resend/models/mass_mailing.py b/mass_mailing_resend/models/mass_mailing.py index ade99070..baec0e50 100644 --- a/mass_mailing_resend/models/mass_mailing.py +++ b/mass_mailing_resend/models/mass_mailing.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/mass_mailing_resend/readme/CONTRIBUTORS.rst b/mass_mailing_resend/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..2d4d7a88 --- /dev/null +++ b/mass_mailing_resend/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* `Tecnativa `_: + + * Pedro M. Baeza diff --git a/mass_mailing_resend/readme/DESCRIPTION.rst b/mass_mailing_resend/readme/DESCRIPTION.rst new file mode 100644 index 00000000..67035819 --- /dev/null +++ b/mass_mailing_resend/readme/DESCRIPTION.rst @@ -0,0 +1,15 @@ +A frequent need for users of mass mailings is to resend one mailing that has +already been sent in the past to new recipients that haven't received yet that +mail. But the problem is to know which are the applicable ones. + +Odoo already includes a method in its mass mailing logic that avoids to resend +the same mail 2 times for one mass mailing, and for v9, there was a trick that +allows to modify the state of a mass mailing from kanban view, covering the +need. + +But now since v10 both status bar in form view and dragging between states in +kanban are not allowed. + +This module introduces a button to restart a mass mailing to draft state, +allowing you to reevaluate the sending domain or list for performing again +the mailing. diff --git a/mass_mailing_resend/readme/ROADMAP.rst b/mass_mailing_resend/readme/ROADMAP.rst new file mode 100644 index 00000000..494b75ad --- /dev/null +++ b/mass_mailing_resend/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +* Add an indicator / filter for knowing resent mailings. +* Include information on the number of new recipients to be sent on the + resending (through `get_remaining_recipients` method). diff --git a/mass_mailing_resend/readme/USAGE.rst b/mass_mailing_resend/readme/USAGE.rst new file mode 100644 index 00000000..a41cdf18 --- /dev/null +++ b/mass_mailing_resend/readme/USAGE.rst @@ -0,0 +1,4 @@ +* Go to *Email marketing > Mailings > Mass Mailings*. +* Click on one record that is done or create a new one and send it. +* You will see a button called "Resend". +* If you click on it, mass mailing will be set to Draft again. diff --git a/mass_mailing_resend/tests/__init__.py b/mass_mailing_resend/tests/__init__.py index efeb8426..6b595861 100644 --- a/mass_mailing_resend/tests/__init__.py +++ b/mass_mailing_resend/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_mass_mailing_resend diff --git a/mass_mailing_resend/tests/test_mass_mailing_resend.py b/mass_mailing_resend/tests/test_mass_mailing_resend.py index 41c25ee9..c6c10dc9 100644 --- a/mass_mailing_resend/tests/test_mass_mailing_resend.py +++ b/mass_mailing_resend/tests/test_mass_mailing_resend.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# Copyright 2017 Tecnativa - Pedro M. Baeza +# Copyright 2017-2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests import common @@ -20,7 +19,9 @@ class TestMassMailingResend(common.SavepointCase): cls.mass_mailing = cls.env['mail.mass_mailing'].create({ 'name': 'Test mass mailing', 'email_from': 'test@example.org', - 'mailing_model': 'mail.mass_mailing.contact', + 'mailing_model_id': cls.env.ref( + 'mass_mailing.model_mail_mass_mailing_contact' + ).id, 'contact_list_ids': [(6, 0, cls.list.ids)], 'reply_to_mode': 'thread', })