diff --git a/mail_optional_follower_notification_account/README.rst b/mail_optional_follower_notification_account/README.rst new file mode 100644 index 0000000000..d8eebb5cb1 --- /dev/null +++ b/mail_optional_follower_notification_account/README.rst @@ -0,0 +1,79 @@ +============================================= +Mail optional follower notification - Account +============================================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:9c68e71c93b147a204c464690db84ee1cfa58d034efb80a3eb83f8c5644c35d4 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/17.0/mail_optional_follower_notification_account + :alt: OCA/social +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_optional_follower_notification_account + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the module "Mail optional follower notification " to +add the possibility to choose if you want to automatically notify +followers in the account app. By default, Odoo notify automatically all +followers. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* NSI-SA + +Contributors +------------ + +- Jérémy Didderen + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_optional_follower_notification_account/__init__.py b/mail_optional_follower_notification_account/__init__.py new file mode 100644 index 0000000000..40272379f7 --- /dev/null +++ b/mail_optional_follower_notification_account/__init__.py @@ -0,0 +1 @@ +from . import wizard diff --git a/mail_optional_follower_notification_account/__manifest__.py b/mail_optional_follower_notification_account/__manifest__.py new file mode 100644 index 0000000000..4c3cf7f3c0 --- /dev/null +++ b/mail_optional_follower_notification_account/__manifest__.py @@ -0,0 +1,13 @@ +# Copyright 2024 NSI-SA () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Mail optional follower notification - Account", + "summary": "Choose to notify followers for account app", + "author": "NSI-SA," "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/social", + "category": "Social Network", + "version": "17.0.1.0.0", + "license": "AGPL-3", + "depends": ["mail_optional_follower_notification", "account"], + "data": ["wizard/account_move_send_views.xml"], +} diff --git a/mail_optional_follower_notification_account/pyproject.toml b/mail_optional_follower_notification_account/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/mail_optional_follower_notification_account/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/mail_optional_follower_notification_account/readme/CONTRIBUTORS.md b/mail_optional_follower_notification_account/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..1f378cfa7b --- /dev/null +++ b/mail_optional_follower_notification_account/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Jérémy Didderen \<\> diff --git a/mail_optional_follower_notification_account/readme/DESCRIPTION.md b/mail_optional_follower_notification_account/readme/DESCRIPTION.md new file mode 100644 index 0000000000..c25f5a92d6 --- /dev/null +++ b/mail_optional_follower_notification_account/readme/DESCRIPTION.md @@ -0,0 +1,4 @@ +This module extends the module "Mail optional follower notification +" to add the possibility to choose if you want to automatically +notify followers in the account app. By default, Odoo notify +automatically all followers. diff --git a/mail_optional_follower_notification_account/static/description/icon.png b/mail_optional_follower_notification_account/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/mail_optional_follower_notification_account/static/description/icon.png differ diff --git a/mail_optional_follower_notification_account/static/description/index.html b/mail_optional_follower_notification_account/static/description/index.html new file mode 100644 index 0000000000..4bb4c4c973 --- /dev/null +++ b/mail_optional_follower_notification_account/static/description/index.html @@ -0,0 +1,426 @@ + + + + + +Mail optional follower notification - Account + + + +
+

Mail optional follower notification - Account

+ + +

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

+

This module extends the module “Mail optional follower notification “ to +add the possibility to choose if you want to automatically notify +followers in the account app. By default, Odoo notify automatically all +followers.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • NSI-SA
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/mail_optional_follower_notification_account/wizard/__init__.py b/mail_optional_follower_notification_account/wizard/__init__.py new file mode 100644 index 0000000000..6ce92408a9 --- /dev/null +++ b/mail_optional_follower_notification_account/wizard/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import account_move_send diff --git a/mail_optional_follower_notification_account/wizard/account_move_send.py b/mail_optional_follower_notification_account/wizard/account_move_send.py new file mode 100644 index 0000000000..48fc394617 --- /dev/null +++ b/mail_optional_follower_notification_account/wizard/account_move_send.py @@ -0,0 +1,18 @@ +# Copyright 2024 NSI-SA () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class AccountMoveSend(models.TransientModel): + _inherit = "account.move.send" + + notify_followers = fields.Boolean(default=True) + + def action_send_and_print( + self, force_synchronous=False, allow_fallback_pdf=False, **kwargs + ): + self.ensure_one() + return super( + AccountMoveSend, self.with_context(notify_followers=self.notify_followers) + ).action_send_and_print(force_synchronous, allow_fallback_pdf, **kwargs) diff --git a/mail_optional_follower_notification_account/wizard/account_move_send_views.xml b/mail_optional_follower_notification_account/wizard/account_move_send_views.xml new file mode 100644 index 0000000000..c92f9b2913 --- /dev/null +++ b/mail_optional_follower_notification_account/wizard/account_move_send_views.xml @@ -0,0 +1,21 @@ + + + + + account.move.send + + + + + + + Warning : Followers will not be notified but they can access the notification directly from the document (if they are allowed to) + + + + +