[MIG] mass_mailing_resend: Migration to 13.0

This commit is contained in:
Pedro M. Baeza 2020-02-05 10:34:32 +01:00 committed by Víctor Martínez
parent ff882a0353
commit eae9567e4a
14 changed files with 59 additions and 45 deletions

View File

@ -7,20 +7,20 @@ Resend mass mailings
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
:alt: Mature
.. |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/12.0/mass_mailing_resend
:target: https://github.com/OCA/social/tree/13.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-12-0/social-12-0-mass_mailing_resend
:target: https://translation.odoo-community.org/projects/social-13-0/social-13-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/12.0
:target: https://runbot.odoo-community.org/runbot/205/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@ -49,7 +49,7 @@ the mailing.
Usage
=====
* Go to *Email marketing > Mailings > Mass Mailings*.
* Go to *Email marketing > 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.
@ -67,7 +67,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/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 <https://github.com/OCA/social/issues/new?body=module:%20mass_mailing_resend%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mass_mailing_resend%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@ -100,6 +100,14 @@ 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 <https://github.com/OCA/social/tree/12.0/mass_mailing_resend>`_ project on GitHub.
.. |maintainer-pedrobaeza| image:: https://github.com/pedrobaeza.png?size=40px
:target: https://github.com/pedrobaeza
:alt: pedrobaeza
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-pedrobaeza|
This module is part of the `OCA/social <https://github.com/OCA/social/tree/13.0/mass_mailing_resend>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -1,10 +1,10 @@
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# Copyright 2017-2020 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Resend mass mailings",
"version": "12.0.1.0.0",
"version": "13.0.1.0.0",
"category": "Marketing",
"website": "https://github.com/OCA/social",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
@ -12,5 +12,7 @@
"application": False,
"installable": True,
"depends": ["mass_mailing"],
"data": ["views/mass_mailing_views.xml"],
"data": ["views/mailing_mailing_views.xml"],
"maintainers": ["pedrobaeza"],
"development_status": "Mature",
}

View File

@ -28,7 +28,7 @@ msgid ""
msgstr ""
#. module: mass_mailing_resend
#: model:ir.model,name:mass_mailing_resend.model_mail_mass_mailing
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
msgid "Mass Mailing"
msgstr "Correu massiu"
@ -38,7 +38,7 @@ msgid "Resend"
msgstr ""
#. module: mass_mailing_resend
#: code:addons/mass_mailing_resend/models/mass_mailing.py:15
#: code:addons/mass_mailing_resend/models/mailing_mailing.py:0
#, python-format
msgid "You can't resend a mass mailing that is being sent or in draft state."
msgstr ""

View File

@ -28,7 +28,7 @@ msgid ""
msgstr ""
#. module: mass_mailing_resend
#: model:ir.model,name:mass_mailing_resend.model_mail_mass_mailing
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
msgid "Mass Mailing"
msgstr "Massenmailing"
@ -38,7 +38,7 @@ msgid "Resend"
msgstr ""
#. module: mass_mailing_resend
#: code:addons/mass_mailing_resend/models/mass_mailing.py:15
#: code:addons/mass_mailing_resend/models/mailing_mailing.py:0
#, python-format
msgid "You can't resend a mass mailing that is being sent or in draft state."
msgstr ""

View File

@ -30,7 +30,7 @@ msgstr ""
"b> para eliminar el/los registro/s existentes."
#. module: mass_mailing_resend
#: model:ir.model,name:mass_mailing_resend.model_mail_mass_mailing
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
msgid "Mass Mailing"
msgstr "Correo masivo"
@ -40,7 +40,7 @@ msgid "Resend"
msgstr "Reenviar"
#. module: mass_mailing_resend
#: code:addons/mass_mailing_resend/models/mass_mailing.py:15
#: code:addons/mass_mailing_resend/models/mailing_mailing.py:0
#, python-format
msgid "You can't resend a mass mailing that is being sent or in draft state."
msgstr ""

View File

@ -34,7 +34,7 @@ msgstr ""
"enregistrement(s) existant(s)."
#. module: mass_mailing_resend
#: model:ir.model,name:mass_mailing_resend.model_mail_mass_mailing
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
msgid "Mass Mailing"
msgstr "Publipostage"
@ -44,7 +44,7 @@ msgid "Resend"
msgstr "Renvoyer"
#. module: mass_mailing_resend
#: code:addons/mass_mailing_resend/models/mass_mailing.py:15
#: code:addons/mass_mailing_resend/models/mailing_mailing.py:0
#, python-format
msgid "You can't resend a mass mailing that is being sent or in draft state."
msgstr ""

View File

@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mass_mailing_resend
# * mass_mailing_resend
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -15,11 +15,15 @@ msgstr ""
#. module: mass_mailing_resend
#: model_terms:ir.ui.view,arch_db:mass_mailing_resend.view_mail_mass_mailing_form
msgid "<i class=\"fa fa-info-circle\"/> New sending will be done only to not sent/new recipients. If you want to resend again the mass mailing to already sent recipients, click on <b>Emails Sent</b> smart-button for removing the existing record(s)."
msgid ""
"<i class=\"fa fa-info-circle\"/> New sending will be done only to not "
"sent/new recipients. If you want to resend again the mass mailing to already"
" sent recipients, click on <b>Emails Sent</b> smart-button for removing the "
"existing record(s)."
msgstr ""
#. module: mass_mailing_resend
#: model:ir.model,name:mass_mailing_resend.model_mail_mass_mailing
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
msgid "Mass Mailing"
msgstr ""
@ -29,8 +33,7 @@ msgid "Resend"
msgstr ""
#. module: mass_mailing_resend
#: code:addons/mass_mailing_resend/models/mass_mailing.py:15
#: code:addons/mass_mailing_resend/models/mailing_mailing.py:0
#, python-format
msgid "You can't resend a mass mailing that is being sent or in draft state."
msgstr ""

View File

@ -29,7 +29,7 @@ msgid ""
msgstr ""
#. module: mass_mailing_resend
#: model:ir.model,name:mass_mailing_resend.model_mail_mass_mailing
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
msgid "Mass Mailing"
msgstr "Masovno razpošiljanje"
@ -39,7 +39,7 @@ msgid "Resend"
msgstr ""
#. module: mass_mailing_resend
#: code:addons/mass_mailing_resend/models/mass_mailing.py:15
#: code:addons/mass_mailing_resend/models/mailing_mailing.py:0
#, python-format
msgid "You can't resend a mass mailing that is being sent or in draft state."
msgstr ""

View File

@ -1,3 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import mass_mailing
from . import mailing_mailing

View File

@ -1,12 +1,12 @@
# Copyright 2017 Tecnativa - Pedro M. Baeza
# Copyright 2017-2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, exceptions, models
class MailMassMailingList(models.Model):
_inherit = "mail.mass_mailing"
class MailingMailing(models.Model):
_inherit = "mailing.mailing"
def button_draft(self):
"""Return to draft state for resending the mass mailing."""

View File

@ -1,4 +1,4 @@
* Go to *Email marketing > Mailings > Mass Mailings*.
* Go to *Email marketing > 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.

View File

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/social/tree/12.0/mass_mailing_resend"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/social-12-0/social-12-0-mass_mailing_resend"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/205/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/social/tree/13.0/mass_mailing_resend"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/social-13-0/social-13-0-mass_mailing_resend"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/205/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>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 havent received yet that
mail. But the problem is to know which are the applicable ones.</p>
@ -397,7 +397,7 @@ the mailing.</p>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
<ul class="simple">
<li>Go to <em>Email marketing &gt; Mailings &gt; Mass Mailings</em>.</li>
<li>Go to <em>Email marketing &gt; Mailings</em>.</li>
<li>Click on one record that is done or create a new one and send it.</li>
<li>You will see a button called “Resend”.</li>
<li>If you click on it, mass mailing will be set to Draft again.</li>
@ -416,7 +416,7 @@ resending (through <cite>get_remaining_recipients</cite> method).</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mass_mailing_resend%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mass_mailing_resend%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@ -444,7 +444,9 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/12.0/mass_mailing_resend">OCA/social</a> project on GitHub.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/pedrobaeza"><img alt="pedrobaeza" src="https://github.com/pedrobaeza.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/13.0/mass_mailing_resend">OCA/social</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

View File

@ -1,4 +1,4 @@
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# Copyright 2017-2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import exceptions
@ -9,18 +9,17 @@ class TestMassMailingResend(common.SavepointCase):
@classmethod
def setUpClass(cls):
super(TestMassMailingResend, cls).setUpClass()
cls.list = cls.env["mail.mass_mailing.list"].create({"name": "Test list"})
cls.contact1 = cls.env["mail.mass_mailing.contact"].create(
cls.list = cls.env["mailing.list"].create({"name": "Test list"})
cls.contact1 = cls.env["mailing.contact"].create(
{"name": "Contact 1", "email": "email1@test.com"}
)
cls.mass_mailing = cls.env["mail.mass_mailing"].create(
cls.mass_mailing = cls.env["mailing.mailing"].create(
{
"name": "Test mass mailing",
"email_from": "test@example.org",
"mailing_model_id": cls.env.ref(
"mass_mailing.model_mail_mass_mailing_contact"
).id,
"mailing_model_id": cls.env.ref("mass_mailing.model_mailing_list").id,
"contact_list_ids": [(6, 0, cls.list.ids)],
"subject": "Mailing test",
"reply_to_mode": "thread",
}
)

View File

@ -2,7 +2,7 @@
<odoo>
<record model="ir.ui.view" id="view_mail_mass_mailing_form">
<field name="model">mail.mass_mailing</field>
<field name="model">mailing.mailing</field>
<field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_form"/>
<field name="arch" type="xml">
<field name="state" position="before">