Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] mail optional follower notification #37

Open
wants to merge 53 commits into
base: 18.0
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
4d05b7d
Add mail_optional_follower_notification module (#60)
adrienpeiffer May 25, 2016
c26ce30
Upgrade version from 8 -> 9
lmignon May 25, 2016
c5faa95
mail.notification has been removed. The notify is done directly on th…
lmignon May 25, 2016
605399c
Tests: Replace XML_IDs no more available in 9.0
lmignon Jun 13, 2016
85c716f
Argument auto_commit in send_mail
ThomasBinsfeld Aug 19, 2016
29a0c9e
Migration of mail_optional_follower_notification to 10.0
adrienpeiffer Oct 24, 2016
3506508
[FIX] Bad version
adrienpeiffer Oct 24, 2016
c2d39a2
[FIX] pep8
sbidoul Dec 26, 2016
fa57f86
[IMP] Hide the checkbox for the mass mailing in mail_optional_followe…
RobinetDenisAcsone Dec 4, 2017
f7d4f12
[FIX] mail_optional_follower_notification: Check force_partners_to_no…
adrienpeiffer Oct 20, 2017
4818e58
[FIX] README.rst syntax
pedrobaeza Jun 30, 2018
bb1e581
Translated using Weblate (German)
marylla Dec 14, 2018
6f2e291
Translated using Weblate (Portuguese)
pedrocs-exo Aug 12, 2019
2531c03
[12.0][MIG] mail_optional_follower_notification
astirpe Nov 29, 2019
b96d524
[IMP] mail_optional_follower_notification: black, isort
lmignon Dec 6, 2019
405e721
[MIG] mail_optional_follower_notification: Migration to 13.0
lmignon Dec 6, 2019
0c3ed26
Update mail_optional_follower_notification/models/mail_thread.py
lmignon Jul 9, 2020
69b39d7
[IMP] pre-commit run -a
Jan 26, 2021
95850bf
[13.0][FIX] mail_optional_follower_notification: change added span re…
glitchov Feb 19, 2021
d7cc48a
[IMP] mail_optional_follower_notification: black, isort, prettier
ioans73 May 7, 2021
77897c7
[MIG] mail_optional_follower_notification: Migration to 14.0
ioans73 May 7, 2021
2484de4
[UPD] Update mail_optional_follower_notification.pot
oca-travis Jan 24, 2022
bb16779
[UPD] README.rst
OCA-git-bot Jan 24, 2022
bfe1e86
Translated using Weblate (Spanish)
olgamarcocb Feb 2, 2022
945a0bd
[MIG] mail_optional_follower_notificatio: Migration to 15.0
robin5210 Mar 9, 2022
dc99065
[UPD] Update mail_optional_follower_notification.pot
Mar 18, 2022
a4ed281
[UPD] README.rst
OCA-git-bot Mar 18, 2022
d656174
mail_optional_follower_notification 15.0.1.0.1
OCA-git-bot Mar 18, 2022
74acf1f
[IMP] update dotfiles [ci skip]
OCA-git-bot Dec 11, 2022
097dea9
[MIG] mail_optional_follower_notification: Migration to 16.0
yankinmax Feb 17, 2023
de2baf7
[FIX] fix value returned by _action_send_mail
ajaniszewska-dev Mar 9, 2023
6a3129f
mail_optional_follower_notification 16.0.1.0.1
OCA-git-bot Mar 20, 2023
c40d54a
Translated using Weblate (Italian)
mymage Jul 24, 2023
fbf08bf
[UPD] README.rst
OCA-git-bot Sep 3, 2023
681f9c3
Translated using Weblate (Spanish)
Ivorra78 Aug 27, 2023
5872dfd
[UPD] Update mail_optional_follower_notification.pot
Oct 18, 2023
1643b7c
Update translation files
weblate Oct 18, 2023
73f6eba
Translated using Weblate (Italian)
mymage Dec 1, 2023
2ee4c67
Translated using Weblate (Portuguese (Brazil))
adrianojprado Dec 22, 2023
03d7ea5
[IMP] mail_optional_follower_notification: pre-commit execution
Jun 4, 2024
727527f
[MIG] mail_optional_follower_notification: Migration to 17.0
Jun 4, 2024
d74764f
[UPD] Update mail_optional_follower_notification.pot
Oct 21, 2024
a5c42a9
[BOT] post-merge updates
OCA-git-bot Oct 21, 2024
cf47012
Update translation files
weblate Oct 21, 2024
780f50e
Translated using Weblate (Italian)
mymage Oct 22, 2024
181e620
Translated using Weblate (Polish)
AndrzejGerasimukARCHIMEDES Feb 7, 2025
c1c13df
[IMP] mail_optional_follower_notification: default notify followers
Quan-nhm Jul 18, 2023
a9039ca
[UPD] Update mail_optional_follower_notification.pot
Feb 12, 2025
04fa1b5
[BOT] post-merge updates
OCA-git-bot Feb 12, 2025
92e8414
Update translation files
weblate Feb 12, 2025
03c4e63
Translated using Weblate (Italian)
mymage Feb 13, 2025
f7bb112
[IMP] mail_optional_follower_notification: pre-commit auto fixes
Feb 17, 2025
c1396aa
[MIG][18.0] mail_optional_follower_notification
Feb 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[IMP] mail_optional_follower_notification: default notify followers
Add a settings to set a default for the boolean 'Notifiy Followers' in the wizard
  • Loading branch information
Quan-nhm authored and Graeme Gellatly committed Feb 17, 2025
commit c1c13df7ce818ae6dc312274aa2b2f8983a9de5f
4 changes: 4 additions & 0 deletions mail_optional_follower_notification/README.rst
Original file line number Diff line number Diff line change
@@ -49,8 +49,11 @@ This field it's initialized to true to keep the standard behavior.

|image2|

|image3|

.. |image1| image:: https://raw.githubusercontent.com/OCA/social/17.0/mail_optional_follower_notification/static/description/optional_follower_001.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/social/17.0/mail_optional_follower_notification/static/description/optional_follower_002.png
.. |image3| image:: https://raw.githubusercontent.com/OCA/social/17.0/mail_optional_follower_notification/static/description/optional_follower_003.png

Bug Tracker
===========
@@ -77,6 +80,7 @@ Contributors
- Laurent Mignon <laurent.mignon@acsone.eu>
- Andrea Stirpe <a.stirpe@onestein.nl>
- Robin Goots <robin.goots@dynapps.be>
- Quan Nguyen quan.nhm@komit-consulting.com

Maintainers
-----------
5 changes: 4 additions & 1 deletion mail_optional_follower_notification/__manifest__.py
Original file line number Diff line number Diff line change
@@ -9,5 +9,8 @@
"version": "17.0.1.0.0",
"license": "AGPL-3",
"depends": ["mail"],
"data": ["wizard/mail_compose_message_view.xml"],
"data": [
"views/res_config_settings_view.xml",
"wizard/mail_compose_message_view.xml",
],
}
2 changes: 2 additions & 0 deletions mail_optional_follower_notification/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from . import mail_thread
from . import res_company
from . import res_config_settings
7 changes: 7 additions & 0 deletions mail_optional_follower_notification/models/res_company.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from odoo import fields, models


class ResCompany(models.Model):
_inherit = "res.company"

notify_followers = fields.Boolean(default=True)
10 changes: 10 additions & 0 deletions mail_optional_follower_notification/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from odoo import fields, models


class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

notify_followers = fields.Boolean(
related="company_id.notify_followers",
readonly=False,
)
1 change: 1 addition & 0 deletions mail_optional_follower_notification/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@
- Laurent Mignon \<<laurent.mignon@acsone.eu>\>
- Andrea Stirpe \<<a.stirpe@onestein.nl>\>
- Robin Goots \<<robin.goots@dynapps.be>\>
- Quan Nguyen <quan.nhm@komit-consulting.com>
2 changes: 2 additions & 0 deletions mail_optional_follower_notification/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -6,3 +6,5 @@ This field it's initialized to true to keep the standard behavior.
![](static/description/optional_follower_001.png)

![](static/description/optional_follower_002.png)

![](static/description/optional_follower_003.png)
Original file line number Diff line number Diff line change
@@ -393,6 +393,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<p>This field it’s initialized to true to keep the standard behavior.</p>
<p><img alt="image1" src="https://raw.githubusercontent.com/OCA/social/17.0/mail_optional_follower_notification/static/description/optional_follower_001.png" /></p>
<p><img alt="image2" src="https://raw.githubusercontent.com/OCA/social/17.0/mail_optional_follower_notification/static/description/optional_follower_002.png" /></p>
<p><img alt="image3" src="https://raw.githubusercontent.com/OCA/social/17.0/mail_optional_follower_notification/static/description/optional_follower_003.png" /></p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
@@ -417,6 +418,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<li>Laurent Mignon &lt;<a class="reference external" href="mailto:laurent.mignon&#64;acsone.eu">laurent.mignon&#64;acsone.eu</a>&gt;</li>
<li>Andrea Stirpe &lt;<a class="reference external" href="mailto:a.stirpe&#64;onestein.nl">a.stirpe&#64;onestein.nl</a>&gt;</li>
<li>Robin Goots &lt;<a class="reference external" href="mailto:robin.goots&#64;dynapps.be">robin.goots&#64;dynapps.be</a>&gt;</li>
<li>Quan Nguyen <a class="reference external" href="mailto:quan.nhm&#64;komit-consulting.com">quan.nhm&#64;komit-consulting.com</a></li>
</ul>
</div>
<div class="section" id="maintainers">
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.mail</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="100" />
<field name="inherit_id" ref="mail.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//block[@id='emails']" position="inside">
<setting help="Default notify followers when the user sending email">
<field name="notify_followers" />
</setting>
</xpath>
</field>
</record>
</odoo>
Original file line number Diff line number Diff line change
@@ -7,7 +7,9 @@
class MailComposeMessage(models.TransientModel):
_inherit = "mail.compose.message"

notify_followers = fields.Boolean(default=True)
notify_followers = fields.Boolean(
default=lambda self: self.env.company.notify_followers
)

def _action_send_mail(self, auto_commit=False):
result_mails_su, result_messages = (