commit
6f2b70e18a
113
mass_mailing_resend/README.rst
Normal file
113
mass_mailing_resend/README.rst
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
====================
|
||||||
|
Resend mass mailings
|
||||||
|
====================
|
||||||
|
|
||||||
|
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
|
||||||
|
:target: https://odoo-community.org/page/development-status
|
||||||
|
: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/15.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-15-0/social-15-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/15.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.
|
||||||
|
|
||||||
|
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**
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
|
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 <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:%2015.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.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Authors
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
* Tecnativa
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||||
|
|
||||||
|
* Pedro M. Baeza
|
||||||
|
* Ernesto Tejeda
|
||||||
|
|
||||||
|
Maintainers
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
.. |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/15.0/mass_mailing_resend>`_ project on GitHub.
|
||||||
|
|
||||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
3
mass_mailing_resend/__init__.py
Normal file
3
mass_mailing_resend/__init__.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from . import models
|
18
mass_mailing_resend/__manifest__.py
Normal file
18
mass_mailing_resend/__manifest__.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# 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": "15.0.1.0.0",
|
||||||
|
"category": "Marketing",
|
||||||
|
"website": "https://github.com/OCA/social",
|
||||||
|
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"application": False,
|
||||||
|
"installable": True,
|
||||||
|
"depends": ["mass_mailing"],
|
||||||
|
"data": ["views/mailing_mailing_views.xml"],
|
||||||
|
"maintainers": ["pedrobaeza"],
|
||||||
|
"development_status": "Mature",
|
||||||
|
}
|
44
mass_mailing_resend/i18n/ca.po
Normal file
44
mass_mailing_resend/i18n/ca.po
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mass_mailing_resend
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2018
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2018-01-24 03:51+0000\n"
|
||||||
|
"PO-Revision-Date: 2018-01-24 03:51+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
|
||||||
|
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
|
||||||
|
"Language: ca\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. 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)."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
|
||||||
|
msgid "Mass Mailing"
|
||||||
|
msgstr "Correu massiu"
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model_terms:ir.ui.view,arch_db:mass_mailing_resend.view_mail_mass_mailing_form
|
||||||
|
msgid "Resend"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: 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 ""
|
44
mass_mailing_resend/i18n/de.po
Normal file
44
mass_mailing_resend/i18n/de.po
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mass_mailing_resend
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2018
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2018-01-24 03:51+0000\n"
|
||||||
|
"PO-Revision-Date: 2018-01-24 03:51+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
|
||||||
|
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. 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)."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
|
||||||
|
msgid "Mass Mailing"
|
||||||
|
msgstr "Massenmailing"
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model_terms:ir.ui.view,arch_db:mass_mailing_resend.view_mail_mass_mailing_form
|
||||||
|
msgid "Resend"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: 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 ""
|
48
mass_mailing_resend/i18n/es.po
Normal file
48
mass_mailing_resend/i18n/es.po
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mass_mailing_resend
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-22 10:42+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-22 10:42+0000\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. 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>Sent</b> smart-button for removing the "
|
||||||
|
"existing record(s)."
|
||||||
|
msgstr ""
|
||||||
|
"<i class=\"fa fa-info-circle\"/> El nuevo envío se realizará solo a los "
|
||||||
|
"destinatarios no enviados/nuevos. Si quiere reenviar otra vez el correo "
|
||||||
|
"masivo a destinatarios ya enviados, pulse en el botón <b>Enviados</"
|
||||||
|
"b> para eliminar el/los registro/s existentes."
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
|
||||||
|
msgid "Mass Mailing"
|
||||||
|
msgstr "Correo masivo"
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model_terms:ir.ui.view,arch_db:mass_mailing_resend.view_mail_mass_mailing_form
|
||||||
|
msgid "Resend"
|
||||||
|
msgstr "Reenviar"
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: 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 ""
|
||||||
|
"No puede reenviar un correo masivo que está siendo enviado en estado "
|
||||||
|
"borrador."
|
52
mass_mailing_resend/i18n/fr.po
Normal file
52
mass_mailing_resend/i18n/fr.po
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mass_mailing_resend
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2018
|
||||||
|
# Quentin THEURET <odoo@kerpeo.com>, 2018
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2018-02-26 01:46+0000\n"
|
||||||
|
"PO-Revision-Date: 2018-02-26 01:46+0000\n"
|
||||||
|
"Last-Translator: Quentin THEURET <odoo@kerpeo.com>, 2018\n"
|
||||||
|
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
|
#. 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)."
|
||||||
|
msgstr ""
|
||||||
|
"<i class=\"fa fa-info-circle\"/>Un nouvel envoi sera effectué uniquement aux "
|
||||||
|
"nouveaux destinataires ou à ceux qui ne l'ont pas encore reçu. Si vous "
|
||||||
|
"souhaitez envoyer à nouveau le publipostage à tous les destinataires, "
|
||||||
|
"cliquez sur le bouton <b>Courriels envoyés</b>pour supprimer le(s) "
|
||||||
|
"enregistrement(s) existant(s)."
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
|
||||||
|
msgid "Mass Mailing"
|
||||||
|
msgstr "Publipostage"
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model_terms:ir.ui.view,arch_db:mass_mailing_resend.view_mail_mass_mailing_form
|
||||||
|
msgid "Resend"
|
||||||
|
msgstr "Renvoyer"
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: 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 ""
|
||||||
|
"Vous ne pouvez pas renvoyer un publipostage qui est déjà envoyé ou dans un "
|
||||||
|
"état brouillon."
|
54
mass_mailing_resend/i18n/mass_mailing_resend.pot
Normal file
54
mass_mailing_resend/i18n/mass_mailing_resend.pot
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mass_mailing_resend
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 14.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. 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>Sent</b> smart-button for removing the "
|
||||||
|
"existing record(s)."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model:ir.model.fields,field_description:mass_mailing_resend.field_mailing_mailing__display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model:ir.model.fields,field_description:mass_mailing_resend.field_mailing_mailing__id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model:ir.model.fields,field_description:mass_mailing_resend.field_mailing_mailing____last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
|
||||||
|
msgid "Mass Mailing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model_terms:ir.ui.view,arch_db:mass_mailing_resend.view_mail_mass_mailing_form
|
||||||
|
msgid "Resend"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: 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 ""
|
45
mass_mailing_resend/i18n/sl.po
Normal file
45
mass_mailing_resend/i18n/sl.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mass_mailing_resend
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2018
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2018-01-24 03:51+0000\n"
|
||||||
|
"PO-Revision-Date: 2018-01-24 03:51+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
|
||||||
|
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
|
||||||
|
"Language: sl\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
|
||||||
|
"%100==4 ? 2 : 3);\n"
|
||||||
|
|
||||||
|
#. 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)."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model:ir.model,name:mass_mailing_resend.model_mailing_mailing
|
||||||
|
msgid "Mass Mailing"
|
||||||
|
msgstr "Masovno razpošiljanje"
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: model_terms:ir.ui.view,arch_db:mass_mailing_resend.view_mail_mass_mailing_form
|
||||||
|
msgid "Resend"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing_resend
|
||||||
|
#: 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 ""
|
3
mass_mailing_resend/models/__init__.py
Normal file
3
mass_mailing_resend/models/__init__.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from . import mailing_mailing
|
20
mass_mailing_resend/models/mailing_mailing.py
Normal file
20
mass_mailing_resend/models/mailing_mailing.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# 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 MailingMailing(models.Model):
|
||||||
|
_inherit = "mailing.mailing"
|
||||||
|
|
||||||
|
def button_draft(self):
|
||||||
|
"""Return to draft state for resending the mass mailing."""
|
||||||
|
if any(self.mapped(lambda x: x.state != "done")):
|
||||||
|
raise exceptions.UserError(
|
||||||
|
_(
|
||||||
|
"You can't resend a mass mailing that is being sent or in "
|
||||||
|
"draft state."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
self.write({"state": "draft"})
|
4
mass_mailing_resend/readme/CONTRIBUTORS.rst
Normal file
4
mass_mailing_resend/readme/CONTRIBUTORS.rst
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||||
|
|
||||||
|
* Pedro M. Baeza
|
||||||
|
* Ernesto Tejeda
|
15
mass_mailing_resend/readme/DESCRIPTION.rst
Normal file
15
mass_mailing_resend/readme/DESCRIPTION.rst
Normal file
@ -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.
|
3
mass_mailing_resend/readme/ROADMAP.rst
Normal file
3
mass_mailing_resend/readme/ROADMAP.rst
Normal file
@ -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).
|
4
mass_mailing_resend/readme/USAGE.rst
Normal file
4
mass_mailing_resend/readme/USAGE.rst
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
* 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.
|
BIN
mass_mailing_resend/static/description/icon.png
Normal file
BIN
mass_mailing_resend/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
84
mass_mailing_resend/static/description/icon.svg
Normal file
84
mass_mailing_resend/static/description/icon.svg
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
width="80"
|
||||||
|
height="80"
|
||||||
|
viewBox="0 0 80 80"
|
||||||
|
sodipodi:docname="icon.svg"
|
||||||
|
inkscape:export-filename="icon.png"
|
||||||
|
inkscape:export-xdpi="144"
|
||||||
|
inkscape:export-ydpi="144">
|
||||||
|
<metadata
|
||||||
|
id="metadata8">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs6" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1855"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview4"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="4.17193"
|
||||||
|
inkscape:cx="62.570254"
|
||||||
|
inkscape:cy="19.555116"
|
||||||
|
inkscape:window-x="65"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg2" />
|
||||||
|
<rect
|
||||||
|
style="opacity:1;fill:#8c7f6c;fill-opacity:1;stroke:none;stroke-width:4.05708647;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect3346"
|
||||||
|
width="80"
|
||||||
|
height="80"
|
||||||
|
x="0"
|
||||||
|
y="0" />
|
||||||
|
<path
|
||||||
|
style="fill:#675d4f;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
||||||
|
d="M 12.344407,43.446175 -0.11984861,56.150127 0,80 41.707315,79.760303 58.366272,62.741801 64.718248,15.042055 Z"
|
||||||
|
id="path3344"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<g
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:36.70288086px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
id="text3367">
|
||||||
|
<path
|
||||||
|
d="m 33.459612,4.6216349 c 0,-0.5325195 -0.327704,-1.0035944 -0.798779,-1.2084096 C 32.169277,3.2084101 31.595794,3.3108177 31.227127,3.6999666 L 28.564529,6.3420824 C 25.676635,3.6180405 21.764665,2.0000005 17.729806,2.0000005 9.0661238,2.0000005 2,9.0661244 2,17.729807 c 0,8.663682 7.0661238,15.729806 15.729806,15.729806 4.690268,0 9.114276,-2.068634 12.104577,-5.673381 0.204816,-0.26626 0.204816,-0.655408 -0.04096,-0.880705 l -2.805968,-2.82645 c -0.14337,-0.122889 -0.327704,-0.184333 -0.512038,-0.184333 -0.184333,0.02048 -0.368667,0.102407 -0.471075,0.245778 -2.007188,2.601153 -5.017972,4.075822 -8.274533,4.075822 -5.775788,0 -10.4865373,-4.710749 -10.4865373,-10.486537 0,-5.775789 4.7107493,-10.4865378 10.4865373,-10.4865378 2.683079,0 5.222787,1.024076 7.14805,2.8059678 l -2.82645,2.82645 c -0.389148,0.368667 -0.491556,0.94215 -0.286741,1.413225 0.204815,0.491556 0.67589,0.81926 1.20841,0.81926 l 9.17572,0 c 0.716853,0 1.310817,-0.593964 1.310817,-1.310817 l 0,-9.1757201 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FontAwesome;-inkscape-font-specification:FontAwesome;fill:#ffffff"
|
||||||
|
id="path3339" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:54.74009323px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
id="text3338">
|
||||||
|
<path
|
||||||
|
d="m 66.470545,12.85352 c -0.610938,-0.427657 -1.435705,-0.458204 -2.077191,-0.06109 l -50.830086,29.32505 c -0.641486,0.366563 -1.038596,1.069143 -0.977502,1.802269 0.06109,0.763673 0.519298,1.405159 1.221877,1.680081 l 14.418149,5.895557 0,13.807211 c 0,0.79422 0.488751,1.527346 1.252424,1.832816 0.213829,0.09164 0.458204,0.122187 0.70258,0.122187 0.549844,0 1.069142,-0.213828 1.435705,-0.641485 l 9.102985,-9.988845 16.09823,6.567589 c 0.244376,0.09164 0.488751,0.152735 0.733126,0.152735 0.336017,0 0.672033,-0.09164 0.946955,-0.244376 0.519298,-0.305469 0.885861,-0.79422 0.977502,-1.374612 L 67.295312,14.808524 C 67.4175,14.04485 67.112031,13.311724 66.470545,12.85352 Z M 56.023496,58.643364 40.994408,52.503431 55.595839,28.157531 29.233841,47.677017 18.970074,43.492088 62.774367,18.229779 56.023496,58.643364 Z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FontAwesome;-inkscape-font-specification:FontAwesome;fill:#ffffff"
|
||||||
|
id="path3342" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
455
mass_mailing_resend/static/description/index.html
Normal file
455
mass_mailing_resend/static/description/index.html
Normal file
@ -0,0 +1,455 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
||||||
|
<title>Resend mass mailings</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
/*
|
||||||
|
:Author: David Goodger (goodger@python.org)
|
||||||
|
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
||||||
|
:Copyright: This stylesheet has been placed in the public domain.
|
||||||
|
|
||||||
|
Default cascading style sheet for the HTML output of Docutils.
|
||||||
|
|
||||||
|
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||||
|
customize this style sheet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* used to remove borders from tables and images */
|
||||||
|
.borderless, table.borderless td, table.borderless th {
|
||||||
|
border: 0 }
|
||||||
|
|
||||||
|
table.borderless td, table.borderless th {
|
||||||
|
/* Override padding for "table.docutils td" with "! important".
|
||||||
|
The right padding separates the table cells. */
|
||||||
|
padding: 0 0.5em 0 0 ! important }
|
||||||
|
|
||||||
|
.first {
|
||||||
|
/* Override more specific margin styles with "! important". */
|
||||||
|
margin-top: 0 ! important }
|
||||||
|
|
||||||
|
.last, .with-subtitle {
|
||||||
|
margin-bottom: 0 ! important }
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none }
|
||||||
|
|
||||||
|
.subscript {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
.superscript {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
a.toc-backref {
|
||||||
|
text-decoration: none ;
|
||||||
|
color: black }
|
||||||
|
|
||||||
|
blockquote.epigraph {
|
||||||
|
margin: 2em 5em ; }
|
||||||
|
|
||||||
|
dl.docutils dd {
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||||
|
dl.docutils dt {
|
||||||
|
font-weight: bold }
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.abstract {
|
||||||
|
margin: 2em 5em }
|
||||||
|
|
||||||
|
div.abstract p.topic-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||||
|
div.hint, div.important, div.note, div.tip, div.warning {
|
||||||
|
margin: 2em ;
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em }
|
||||||
|
|
||||||
|
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||||
|
div.important p.admonition-title, div.note p.admonition-title,
|
||||||
|
div.tip p.admonition-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||||
|
div.danger p.admonition-title, div.error p.admonition-title,
|
||||||
|
div.warning p.admonition-title, .code .error {
|
||||||
|
color: red ;
|
||||||
|
font-weight: bold ;
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||||
|
compound paragraphs.
|
||||||
|
div.compound .compound-first, div.compound .compound-middle {
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
div.compound .compound-last, div.compound .compound-middle {
|
||||||
|
margin-top: 0.5em }
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.dedication {
|
||||||
|
margin: 2em 5em ;
|
||||||
|
text-align: center ;
|
||||||
|
font-style: italic }
|
||||||
|
|
||||||
|
div.dedication p.topic-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-style: normal }
|
||||||
|
|
||||||
|
div.figure {
|
||||||
|
margin-left: 2em ;
|
||||||
|
margin-right: 2em }
|
||||||
|
|
||||||
|
div.footer, div.header {
|
||||||
|
clear: both;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
div.line-block {
|
||||||
|
display: block ;
|
||||||
|
margin-top: 1em ;
|
||||||
|
margin-bottom: 1em }
|
||||||
|
|
||||||
|
div.line-block div.line-block {
|
||||||
|
margin-top: 0 ;
|
||||||
|
margin-bottom: 0 ;
|
||||||
|
margin-left: 1.5em }
|
||||||
|
|
||||||
|
div.sidebar {
|
||||||
|
margin: 0 0 0.5em 1em ;
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em ;
|
||||||
|
background-color: #ffffee ;
|
||||||
|
width: 40% ;
|
||||||
|
float: right ;
|
||||||
|
clear: right }
|
||||||
|
|
||||||
|
div.sidebar p.rubric {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-size: medium }
|
||||||
|
|
||||||
|
div.system-messages {
|
||||||
|
margin: 5em }
|
||||||
|
|
||||||
|
div.system-messages h1 {
|
||||||
|
color: red }
|
||||||
|
|
||||||
|
div.system-message {
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em }
|
||||||
|
|
||||||
|
div.system-message p.system-message-title {
|
||||||
|
color: red ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
div.topic {
|
||||||
|
margin: 2em }
|
||||||
|
|
||||||
|
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||||
|
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||||
|
margin-top: 0.4em }
|
||||||
|
|
||||||
|
h1.title {
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
h2.subtitle {
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
hr.docutils {
|
||||||
|
width: 75% }
|
||||||
|
|
||||||
|
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||||
|
clear: left ;
|
||||||
|
float: left ;
|
||||||
|
margin-right: 1em }
|
||||||
|
|
||||||
|
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||||
|
clear: right ;
|
||||||
|
float: right ;
|
||||||
|
margin-left: 1em }
|
||||||
|
|
||||||
|
img.align-center, .figure.align-center, object.align-center {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.align-center {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-left {
|
||||||
|
text-align: left }
|
||||||
|
|
||||||
|
.align-center {
|
||||||
|
clear: both ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
.align-right {
|
||||||
|
text-align: right }
|
||||||
|
|
||||||
|
/* reset inner alignment in figures */
|
||||||
|
div.align-right {
|
||||||
|
text-align: inherit }
|
||||||
|
|
||||||
|
/* div.align-center * { */
|
||||||
|
/* text-align: left } */
|
||||||
|
|
||||||
|
.align-top {
|
||||||
|
vertical-align: top }
|
||||||
|
|
||||||
|
.align-middle {
|
||||||
|
vertical-align: middle }
|
||||||
|
|
||||||
|
.align-bottom {
|
||||||
|
vertical-align: bottom }
|
||||||
|
|
||||||
|
ol.simple, ul.simple {
|
||||||
|
margin-bottom: 1em }
|
||||||
|
|
||||||
|
ol.arabic {
|
||||||
|
list-style: decimal }
|
||||||
|
|
||||||
|
ol.loweralpha {
|
||||||
|
list-style: lower-alpha }
|
||||||
|
|
||||||
|
ol.upperalpha {
|
||||||
|
list-style: upper-alpha }
|
||||||
|
|
||||||
|
ol.lowerroman {
|
||||||
|
list-style: lower-roman }
|
||||||
|
|
||||||
|
ol.upperroman {
|
||||||
|
list-style: upper-roman }
|
||||||
|
|
||||||
|
p.attribution {
|
||||||
|
text-align: right ;
|
||||||
|
margin-left: 50% }
|
||||||
|
|
||||||
|
p.caption {
|
||||||
|
font-style: italic }
|
||||||
|
|
||||||
|
p.credits {
|
||||||
|
font-style: italic ;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
p.label {
|
||||||
|
white-space: nowrap }
|
||||||
|
|
||||||
|
p.rubric {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-size: larger ;
|
||||||
|
color: maroon ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
p.sidebar-title {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold ;
|
||||||
|
font-size: larger }
|
||||||
|
|
||||||
|
p.sidebar-subtitle {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
p.topic-title {
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
pre.address {
|
||||||
|
margin-bottom: 0 ;
|
||||||
|
margin-top: 0 ;
|
||||||
|
font: inherit }
|
||||||
|
|
||||||
|
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||||
|
margin-left: 2em ;
|
||||||
|
margin-right: 2em }
|
||||||
|
|
||||||
|
pre.code .ln { color: grey; } /* line numbers */
|
||||||
|
pre.code, code { background-color: #eeeeee }
|
||||||
|
pre.code .comment, code .comment { color: #5C6576 }
|
||||||
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||||
|
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||||
|
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||||
|
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||||
|
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||||
|
|
||||||
|
span.classifier {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-style: oblique }
|
||||||
|
|
||||||
|
span.classifier-delimiter {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
span.interpreted {
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
span.option {
|
||||||
|
white-space: nowrap }
|
||||||
|
|
||||||
|
span.pre {
|
||||||
|
white-space: pre }
|
||||||
|
|
||||||
|
span.problematic {
|
||||||
|
color: red }
|
||||||
|
|
||||||
|
span.section-subtitle {
|
||||||
|
/* font-size relative to parent (h1..h6 element) */
|
||||||
|
font-size: 80% }
|
||||||
|
|
||||||
|
table.citation {
|
||||||
|
border-left: solid 1px gray;
|
||||||
|
margin-left: 1px }
|
||||||
|
|
||||||
|
table.docinfo {
|
||||||
|
margin: 2em 4em }
|
||||||
|
|
||||||
|
table.docutils {
|
||||||
|
margin-top: 0.5em ;
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
table.footnote {
|
||||||
|
border-left: solid 1px black;
|
||||||
|
margin-left: 1px }
|
||||||
|
|
||||||
|
table.docutils td, table.docutils th,
|
||||||
|
table.docinfo td, table.docinfo th {
|
||||||
|
padding-left: 0.5em ;
|
||||||
|
padding-right: 0.5em ;
|
||||||
|
vertical-align: top }
|
||||||
|
|
||||||
|
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||||
|
font-weight: bold ;
|
||||||
|
text-align: left ;
|
||||||
|
white-space: nowrap ;
|
||||||
|
padding-left: 0 }
|
||||||
|
|
||||||
|
/* "booktabs" style (no vertical lines) */
|
||||||
|
table.docutils.booktabs {
|
||||||
|
border: 0px;
|
||||||
|
border-top: 2px solid;
|
||||||
|
border-bottom: 2px solid;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
table.docutils.booktabs * {
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
table.docutils.booktabs th {
|
||||||
|
border-bottom: thin solid;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||||
|
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||||
|
font-size: 100% }
|
||||||
|
|
||||||
|
ul.auto-toc {
|
||||||
|
list-style-type: none }
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="document" id="resend-mass-mailings">
|
||||||
|
<h1 class="title">Resend mass mailings</h1>
|
||||||
|
|
||||||
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! 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="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/15.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-15-0/social-15-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/15.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 haven’t received yet that
|
||||||
|
mail. But the problem is to know which are the applicable ones.</p>
|
||||||
|
<p>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.</p>
|
||||||
|
<p>But now since v10 both status bar in form view and dragging between states in
|
||||||
|
kanban are not allowed.</p>
|
||||||
|
<p>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.</p>
|
||||||
|
<p><strong>Table of contents</strong></p>
|
||||||
|
<div class="contents local topic" id="contents">
|
||||||
|
<ul class="simple">
|
||||||
|
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
|
||||||
|
<li><a class="reference internal" href="#known-issues-roadmap" id="id2">Known issues / Roadmap</a></li>
|
||||||
|
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
|
||||||
|
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
|
||||||
|
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
|
||||||
|
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
|
||||||
|
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="usage">
|
||||||
|
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Go to <em>Email marketing > 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>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="known-issues-roadmap">
|
||||||
|
<h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Add an indicator / filter for knowing resent mailings.</li>
|
||||||
|
<li>Include information on the number of new recipients to be sent on the
|
||||||
|
resending (through <cite>get_remaining_recipients</cite> method).</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="bug-tracker">
|
||||||
|
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
|
||||||
|
<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:%2015.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">
|
||||||
|
<h1><a class="toc-backref" href="#id4">Credits</a></h1>
|
||||||
|
<div class="section" id="authors">
|
||||||
|
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Tecnativa</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="contributors">
|
||||||
|
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||||
|
<li>Pedro M. Baeza</li>
|
||||||
|
<li>Ernesto Tejeda</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="maintainers">
|
||||||
|
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
|
||||||
|
<p>This module is maintained by the OCA.</p>
|
||||||
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||||
|
<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>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/15.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>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
3
mass_mailing_resend/tests/__init__.py
Normal file
3
mass_mailing_resend/tests/__init__.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from . import test_mass_mailing_resend
|
63
mass_mailing_resend/tests/test_mass_mailing_resend.py
Normal file
63
mass_mailing_resend/tests/test_mass_mailing_resend.py
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# Copyright 2017-2020 Tecnativa - Pedro M. Baeza
|
||||||
|
# Copyright 2022 Tecnativa - Víctor Martínez
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from odoo import exceptions
|
||||||
|
from odoo.tests import common
|
||||||
|
|
||||||
|
|
||||||
|
class TestMassMailingResend(common.TransactionCase):
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls):
|
||||||
|
super().setUpClass()
|
||||||
|
cls.list = cls.env["mailing.list"].create({"name": "Test list"})
|
||||||
|
cls.contact1 = cls.env["mailing.contact"].create(
|
||||||
|
{
|
||||||
|
"name": "Contact 1",
|
||||||
|
"email": "email1@test.com",
|
||||||
|
"list_ids": [[6, 0, [cls.list.id]]],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
cls.contact2 = cls.env["mailing.contact"].create(
|
||||||
|
{
|
||||||
|
"name": "Contact 2",
|
||||||
|
"email": "email2@test.com",
|
||||||
|
"list_ids": [[6, 0, [cls.list.id]]],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
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_mailing_list").id,
|
||||||
|
"contact_list_ids": [(6, 0, cls.list.ids)],
|
||||||
|
"subject": "Mailing test",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
cls.mm_cron = cls.env.ref("mass_mailing.ir_cron_mass_mailing_queue").sudo()
|
||||||
|
|
||||||
|
def test_resend_error(self):
|
||||||
|
with self.assertRaises(exceptions.UserError):
|
||||||
|
self.mass_mailing.button_draft()
|
||||||
|
|
||||||
|
def _mailing_action_done(self):
|
||||||
|
self.mass_mailing.action_launch()
|
||||||
|
self.mm_cron.method_direct_trigger()
|
||||||
|
|
||||||
|
def test_resend_process(self):
|
||||||
|
# Send mailing
|
||||||
|
self._mailing_action_done()
|
||||||
|
self.assertEqual(self.mass_mailing.state, "done")
|
||||||
|
self.assertEqual(self.mass_mailing.sent, 2)
|
||||||
|
# Simulate that an email has not been sent
|
||||||
|
self.mass_mailing.mailing_trace_ids.filtered(
|
||||||
|
lambda x: x.email == self.contact2.email
|
||||||
|
).unlink()
|
||||||
|
self.assertEqual(self.mass_mailing.sent, 1)
|
||||||
|
# Back to draft
|
||||||
|
self.mass_mailing.button_draft()
|
||||||
|
self.assertEqual(self.mass_mailing.state, "draft")
|
||||||
|
# Send mailing again (already sent not sent again)
|
||||||
|
self._mailing_action_done()
|
||||||
|
self.assertEqual(self.mass_mailing.state, "done")
|
||||||
|
self.assertEqual(self.mass_mailing.sent, 2)
|
47
mass_mailing_resend/views/mailing_mailing_views.xml
Normal file
47
mass_mailing_resend/views/mailing_mailing_views.xml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<record id="view_mail_mass_mailing_form" model="ir.ui.view">
|
||||||
|
<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">
|
||||||
|
<button
|
||||||
|
string="Resend"
|
||||||
|
states="done"
|
||||||
|
name="button_draft"
|
||||||
|
type="object"
|
||||||
|
/>
|
||||||
|
</field>
|
||||||
|
<header position="after">
|
||||||
|
<div
|
||||||
|
class="oe_form_box_info bg-warning oe_text_center"
|
||||||
|
attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('sent', '=', 0)]}"
|
||||||
|
>
|
||||||
|
<p>
|
||||||
|
<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
|
||||||
|
>Sent</b> smart-button for removing the existing record(s).
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div name="button_box" position="attributes">
|
||||||
|
<attribute name="attrs">{'invisible': [('sent', '=', 0)]}</attribute>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<record id="mailing_mailing_view_form_full_width" model="ir.ui.view">
|
||||||
|
<field name="model">mailing.mailing</field>
|
||||||
|
<field
|
||||||
|
name="inherit_id"
|
||||||
|
ref="mass_mailing.mailing_mailing_view_form_full_width"
|
||||||
|
/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<button name="action_view_traces_sent" position="attributes">
|
||||||
|
<attribute
|
||||||
|
name="attrs"
|
||||||
|
>{'invisible': [('state', 'in', ('draft','test')),('sent', '=', 0)]}</attribute>
|
||||||
|
</button>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
1
setup/mass_mailing_resend/odoo/addons/mass_mailing_resend
Symbolic link
1
setup/mass_mailing_resend/odoo/addons/mass_mailing_resend
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../mass_mailing_resend
|
6
setup/mass_mailing_resend/setup.py
Normal file
6
setup/mass_mailing_resend/setup.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['setuptools-odoo'],
|
||||||
|
odoo_addon=True,
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user