mirror of https://github.com/OCA/social.git
Merge pull request #294 from Tecnativa/11.0-mass_mailing_resend
[11.0][MIG] mass_mailing_resendpull/300/head
commit
154c04443a
|
@ -0,0 +1,104 @@
|
|||
====================
|
||||
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.
|
||||
|
||||
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 > 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 <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:%2011.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
|
||||
|
||||
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.
|
||||
|
||||
This module is part of the `OCA/social <https://github.com/OCA/social/tree/11.0/mass_mailing_resend>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import models
|
|
@ -0,0 +1,20 @@
|
|||
# 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": "11.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/mass_mailing_views.xml",
|
||||
],
|
||||
}
|
|
@ -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: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_mail_mass_mailing
|
||||
msgid "Mass Mailing"
|
||||
msgstr "Correu massiu"
|
||||
|
||||
#. module: mass_mailing_resend
|
||||
#: model: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/mass_mailing.py:16
|
||||
#, python-format
|
||||
msgid "You can't resend a mass mailing that is being sent or in draft state."
|
||||
msgstr ""
|
|
@ -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: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_mail_mass_mailing
|
||||
msgid "Mass Mailing"
|
||||
msgstr "Massenmailing"
|
||||
|
||||
#. module: mass_mailing_resend
|
||||
#: model: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/mass_mailing.py:16
|
||||
#, python-format
|
||||
msgid "You can't resend a mass mailing that is being sent or in draft state."
|
||||
msgstr ""
|
|
@ -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: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\"/> 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>Correos enviados</"
|
||||
"b> para eliminar el/los registro/s existentes."
|
||||
|
||||
#. module: mass_mailing_resend
|
||||
#: model:ir.model,name:mass_mailing_resend.model_mail_mass_mailing
|
||||
msgid "Mass Mailing"
|
||||
msgstr "Correo masivo"
|
||||
|
||||
#. module: mass_mailing_resend
|
||||
#: model: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/mass_mailing.py:16
|
||||
#, 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."
|
|
@ -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: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_mail_mass_mailing
|
||||
msgid "Mass Mailing"
|
||||
msgstr "Publipostage"
|
||||
|
||||
#. module: mass_mailing_resend
|
||||
#: model: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/mass_mailing.py:16
|
||||
#, 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."
|
|
@ -0,0 +1,36 @@
|
|||
# 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"
|
||||
"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: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_mail_mass_mailing
|
||||
msgid "Mass Mailing"
|
||||
msgstr ""
|
||||
|
||||
#. module: mass_mailing_resend
|
||||
#: model: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/mass_mailing.py:16
|
||||
#, python-format
|
||||
msgid "You can't resend a mass mailing that is being sent or in draft state."
|
||||
msgstr ""
|
||||
|
|
@ -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: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_mail_mass_mailing
|
||||
msgid "Mass Mailing"
|
||||
msgstr "Masovno razpošiljanje"
|
||||
|
||||
#. module: mass_mailing_resend
|
||||
#: model: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/mass_mailing.py:16
|
||||
#, python-format
|
||||
msgid "You can't resend a mass mailing that is being sent or in draft state."
|
||||
msgstr ""
|
|
@ -0,0 +1,3 @@
|
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import mass_mailing
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright 2017 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"
|
||||
|
||||
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'})
|
|
@ -0,0 +1,3 @@
|
|||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Pedro M. Baeza
|
|
@ -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.
|
|
@ -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).
|
|
@ -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.
|
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
|
@ -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 |
|
@ -0,0 +1,3 @@
|
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import test_mass_mailing_resend
|
|
@ -0,0 +1,37 @@
|
|||
# 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
|
||||
from odoo import exceptions
|
||||
|
||||
|
||||
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({
|
||||
'name': 'Contact 1',
|
||||
'email': 'email1@test.com',
|
||||
})
|
||||
cls.mass_mailing = cls.env['mail.mass_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,
|
||||
'contact_list_ids': [(6, 0, cls.list.ids)],
|
||||
'reply_to_mode': 'thread',
|
||||
})
|
||||
|
||||
def test_resend_error(self):
|
||||
with self.assertRaises(exceptions.UserError):
|
||||
self.mass_mailing.button_draft()
|
||||
|
||||
def test_resend(self):
|
||||
self.mass_mailing.state = 'done' # Force state
|
||||
self.assertEqual(self.mass_mailing.state, 'done')
|
||||
self.mass_mailing.button_draft()
|
||||
self.assertEqual(self.mass_mailing.state, 'draft')
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="view_mail_mass_mailing_form">
|
||||
<field name="model">mail.mass_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="alert alert-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>Emails 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>
|
||||
|
||||
</odoo>
|
Loading…
Reference in New Issue