mirror of https://github.com/OCA/social.git
[MIG] mass_mailing_newsletter_welcome_mail: Migration to 12.0
parent
bb7f7d39a6
commit
950518ac26
|
@ -14,13 +14,13 @@ Welcome mail to new subscribers
|
|||
: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_newsletter_welcome_mail
|
||||
:target: https://github.com/OCA/social/tree/12.0/mass_mailing_newsletter_welcome_mail
|
||||
: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_newsletter_welcome_mail
|
||||
:target: https://translation.odoo-community.org/projects/social-12-0/social-12-0-mass_mailing_newsletter_welcome_mail
|
||||
: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
|
||||
:target: https://runbot.odoo-community.org/runbot/205/12.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
@ -39,7 +39,7 @@ Configuration
|
|||
|
||||
To configure this module, you need to:
|
||||
|
||||
#. Go to *Email Marketing > Contacts > Mailing Lists*.
|
||||
#. Go to *Email Marketing > Mailing Lists > Mailing Lists*.
|
||||
#. Edit or create one.
|
||||
#. Set a *Welcome mail template* to enable this module's special behavior when
|
||||
somebody subscribes to this mailing list. You can use one shipped with
|
||||
|
@ -82,7 +82,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_newsletter_welcome_mail%0Aversion:%2011.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_newsletter_welcome_mail%0Aversion:%2012.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.
|
||||
|
||||
|
@ -102,6 +102,7 @@ Contributors
|
|||
|
||||
* Cristina Martin R.
|
||||
* Jairo Llopis
|
||||
* Ernesto Tejeda
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
@ -116,6 +117,6 @@ 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_newsletter_welcome_mail>`_ project on GitHub.
|
||||
This module is part of the `OCA/social <https://github.com/OCA/social/tree/12.0/mass_mailing_newsletter_welcome_mail>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
'author': 'Tecnativa, '
|
||||
'Odoo Community Association (OCA)',
|
||||
'category': 'Social',
|
||||
'version': '11.0.1.0.0',
|
||||
'version': '12.0.1.0.0',
|
||||
'website': 'https://github.com/OCA/social',
|
||||
'depends': [
|
||||
'website_mass_mailing',
|
||||
|
|
|
@ -16,11 +16,16 @@ class MassMailController(main.MassMailController):
|
|||
if not template:
|
||||
return result
|
||||
# Welcome new subscribers
|
||||
contact = request.env["mail.mass_mailing.contact"].sudo().search([
|
||||
('list_ids', 'in', list_.ids),
|
||||
('email', '=', email),
|
||||
("opt_out", "=", False),
|
||||
contact_obj = request.env["mail.mass_mailing.contact"].with_context(
|
||||
default_list_ids=[list_id])
|
||||
contact = contact_obj.sudo().search([
|
||||
('email', '=', request.session['mass_mailing_email']),
|
||||
('opt_out', '=', False), # Needed until odoo/odoo#39604 is fixed
|
||||
('is_blacklisted', '=', False),
|
||||
], limit=1)
|
||||
# Needed until odoo/odoo#39604 is fixed
|
||||
if not contact:
|
||||
return result
|
||||
template.with_context(list_name=list_.name).send_mail(
|
||||
contact.id,
|
||||
# Must send now to use context
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
To configure this module, you need to:
|
||||
|
||||
#. Go to *Email Marketing > Contacts > Mailing Lists*.
|
||||
#. Go to *Email Marketing > Mailing Lists > Mailing Lists*.
|
||||
#. Edit or create one.
|
||||
#. Set a *Welcome mail template* to enable this module's special behavior when
|
||||
somebody subscribes to this mailing list. You can use one shipped with
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
|
||||
* Cristina Martin R.
|
||||
* Jairo Llopis
|
||||
* Ernesto Tejeda
|
||||
|
|
|
@ -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/11.0/mass_mailing_newsletter_welcome_mail"><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-11-0/social-11-0-mass_mailing_newsletter_welcome_mail"><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/11.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="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_newsletter_welcome_mail"><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_newsletter_welcome_mail"><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>This module was written to extend the functionality of the website popup
|
||||
newsletter subscription form to support sending to new subscribers an
|
||||
automatic welcome email and allow you to customize it.</p>
|
||||
|
@ -390,7 +390,7 @@ automatic welcome email and allow you to customize it.</p>
|
|||
<h1><a class="toc-backref" href="#id1">Configuration</a></h1>
|
||||
<p>To configure this module, you need to:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to <em>Email Marketing > Contacts > Mailing Lists</em>.</li>
|
||||
<li>Go to <em>Email Marketing > Mailing Lists > Mailing Lists</em>.</li>
|
||||
<li>Edit or create one.</li>
|
||||
<li>Set a <em>Welcome mail template</em> to enable this module’s special behavior when
|
||||
somebody subscribes to this mailing list. You can use one shipped with
|
||||
|
@ -433,7 +433,7 @@ emails will never be sent.</p>
|
|||
<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_newsletter_welcome_mail%0Aversion:%2011.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_newsletter_welcome_mail%0Aversion:%2012.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">
|
||||
|
@ -450,6 +450,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||
<li>Cristina Martin R.</li>
|
||||
<li>Jairo Llopis</li>
|
||||
<li>Ernesto Tejeda</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -461,7 +462,7 @@ 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/11.0/mass_mailing_newsletter_welcome_mail">OCA/social</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/12.0/mass_mailing_newsletter_welcome_mail">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>
|
||||
|
|
Loading…
Reference in New Issue