From 1816ebc1706d2189323b641aa353b38fbbdb730a 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 +- .../i18n/mass_mailing_resend.pot | 4 +- 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 + .../static/description/index.html | 452 ++++++++++++++++++ mass_mailing_resend/tests/__init__.py | 1 - .../tests/test_mass_mailing_resend.py | 7 +- 12 files changed, 540 insertions(+), 37 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 create mode 100644 mass_mailing_resend/static/description/index.html diff --git a/mass_mailing_resend/README.rst b/mass_mailing_resend/README.rst index 84deb12..e325985 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 (https://www.tecnativa.com): - * Pedro M. Baeza +* `Tecnativa `_: -Maintainer ----------- + * Pedro M. Baeza + +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 9e7260b..6c6a103 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/i18n/mass_mailing_resend.pot b/mass_mailing_resend/i18n/mass_mailing_resend.pot index e05b393..3bfdd90 100644 --- a/mass_mailing_resend/i18n/mass_mailing_resend.pot +++ b/mass_mailing_resend/i18n/mass_mailing_resend.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -29,7 +29,7 @@ msgid "Resend" msgstr "" #. module: mass_mailing_resend -#: code:addons/mass_mailing_resend/models/mass_mailing.py:16 +#: code:addons/mass_mailing_resend/models/mass_mailing.py:15 #, python-format msgid "You can't resend a mass mailing that is being sent or in draft state." msgstr "" diff --git a/mass_mailing_resend/models/__init__.py b/mass_mailing_resend/models/__init__.py index d06de60..57344fa 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 ade9907..baec0e5 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 0000000..2d4d7a8 --- /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 0000000..6703581 --- /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 0000000..494b75a --- /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 0000000..a41cdf1 --- /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/static/description/index.html b/mass_mailing_resend/static/description/index.html new file mode 100644 index 0000000..1ffe22d --- /dev/null +++ b/mass_mailing_resend/static/description/index.html @@ -0,0 +1,452 @@ + + + + + + +Resend mass mailings + + + +
+

Resend mass mailings

+ + +

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runbot

+

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.

+

Table of contents

+ +
+

Usage

+
    +
  • 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.
  • +
+
+
+

Known issues / Roadmap

+
    +
  • 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).
  • +
+
+
+

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

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

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/tests/__init__.py b/mass_mailing_resend/tests/__init__.py index efeb842..6b59586 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 41c25ee..c6c10dc 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', })