[MIG] mail_show_follower: Migration to 15.0

[REF] Compact comment
This commit is contained in:
Eduardo De Miguel 2022-03-11 13:06:44 +01:00
parent f75e5ef3bc
commit ecaf6d7a4e
8 changed files with 19 additions and 20 deletions

View File

@ -14,16 +14,16 @@ Mail Show Follower
: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/mail_show_follower
:target: https://github.com/OCA/social/tree/15.0/mail_show_follower
: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-mail_show_follower
:target: https://translation.odoo-community.org/projects/social-15-0/social-15-0-mail_show_follower
: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/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
|badge1| |badge2| |badge3| |badge4| |badge5|
This module extends the functionality of mailing to show the document followers in head of the mails.
In the cc, only appear when:
@ -57,7 +57,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:%20mail_show_follower%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:%20mail_show_follower%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.
@ -88,6 +88,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/12.0/mail_show_follower>`_ project on GitHub.
This module is part of the `OCA/social <https://github.com/OCA/social/tree/15.0/mail_show_follower>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

0
mail_show_follower/__init__.py Executable file → Normal file
View File

7
mail_show_follower/__manifest__.py Executable file → Normal file
View File

@ -4,7 +4,7 @@
{
"name": "Mail Show Follower",
"summary": "Show CC document followers in mails.",
"version": "12.0.1.0.1",
"version": "15.0.1.0.0",
"category": "Mail",
"website": "https://github.com/OCA/social",
"author": "Sygel, Odoo Community Association (OCA)",
@ -12,5 +12,8 @@
"application": False,
"installable": True,
"depends": ["base", "mail"],
"data": ["views/res_config_settings.xml", "views/res_users.xml"],
"data": [
"views/res_config_settings.xml",
"views/res_users.xml",
],
}

View File

@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-01-19 15:32+0000\n"
"Last-Translator: Yann Papouin <ypa@decgroupe.com>\n"

View File

@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
@ -48,4 +48,3 @@ msgstr ""
#: model:ir.model,name:mail_show_follower.model_res_users
msgid "Users"
msgstr ""

0
mail_show_follower/models/__init__.py Executable file → Normal file
View File

9
mail_show_follower/models/mail_mail.py Executable file → Normal file
View File

@ -1,10 +1,9 @@
from odoo import api, models
from odoo import models
class MailMail(models.Model):
_inherit = "mail.mail"
@api.multi
def _send(self, auto_commit=False, raise_exception=False, smtp_session=None):
plain_text = (
'<div summary="o_mail_notification" style="padding: 0px; '
@ -71,9 +70,7 @@ class MailMail(models.Model):
)
partners = partners.filtered(
lambda x: not x.user_ids
or
# otherwise, email is not sent
x.user_ids
or x.user_ids # otherwise, email is not sent
and "email" in x.user_ids.mapped("notification_type")
)
# get names and emails
@ -86,7 +83,7 @@ class MailMail(models.Model):
# it is saved in the body_html field so that it does
# not appear in the odoo log
mail.body_html = final_cc + mail.body_html
return super(MailMail, self)._send(
return super()._send(
auto_commit=auto_commit,
raise_exception=raise_exception,
smtp_session=smtp_session,

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/mail_show_follower"><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-mail_show_follower"><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="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/15.0/mail_show_follower"><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-mail_show_follower"><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>This module extends the functionality of mailing to show the document followers in head of the mails.
In the cc, only appear when:</p>
<ol class="arabic simple">
@ -408,7 +408,7 @@ In the cc, only appear when:</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:%20mail_show_follower%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:%20mail_show_follower%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">
@ -433,7 +433,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/12.0/mail_show_follower">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/15.0/mail_show_follower">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>