Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
119 changes: 119 additions & 0 deletions mail_no_user_assign_notification/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

================================
Mail No user Assign Notification
================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2258ebf0f9828ca3d8384d904798cf7e1e4d0d9deb76aa232524103948b1c5de
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-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%2Fmail-lightgray.png?logo=github
:target: https://github.com/OCA/mail/tree/18.0/mail_no_user_assign_notification
:alt: OCA/mail
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_no_user_assign_notification
: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/mail&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module inhibits the assignation notification from the models that
we want.

**Table of contents**

.. contents::
:local:

Configuration
=============

1. Go to Settings > Technical > System Parameters
2. Edit "mailno_user_assign_notification.models" key record
3. Set any model\* (for example: res.partner).

NOTE1: It is possible to set several models separated by comma (e.g.:
model1,model2).

NOTE2: The model should have the field user_id for this to be effective.

Usage
=====

1. Go to one of the configured models (like Contacts).
2. Create or edit a record, and assign the field for the user (in
contacts, it's called "Salesperson", in purchase orders it's
"Purchase representative", etc).
3. The user won't receive the automatic assignment email.

Known issues / Roadmap
======================

- This is not valid for project tasks users assignation, as the field is
multi-relational. A specific extension would be needed.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/mail/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 <https://github.com/OCA/mail/issues/new?body=module:%20mail_no_user_assign_notification%0Aversion:%2018.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>`__:

- Víctor Martínez
- 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.

.. |maintainer-victoralmau| image:: https://github.com/victoralmau.png?size=40px
:target: https://github.com/victoralmau
:alt: victoralmau

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-victoralmau|

This module is part of the `OCA/mail <https://github.com/OCA/mail/tree/18.0/mail_no_user_assign_notification>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions mail_no_user_assign_notification/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions mail_no_user_assign_notification/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2024 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Mail No user Assign Notification",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/mail",
"version": "19.0.1.0.0",
"depends": ["mail"],
"license": "AGPL-3",
"category": "Discuss",
"data": ["data/ir_config_parameter.xml"],
"installable": True,
"maintainers": ["victoralmau"],
}
7 changes: 7 additions & 0 deletions mail_no_user_assign_notification/data/ir_config_parameter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="no_user_assign_notification_models" model="ir.config_parameter">
<field name="key">mail_no_user_assign_notification.models</field>
<field name="value" />
</record>
</odoo>
22 changes: 22 additions & 0 deletions mail_no_user_assign_notification/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_no_user_assign_notification
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2026-02-17 13:09+0000\n"
"Last-Translator: MJD <maximilian@si-gmbh.de>\n"
"Language-Team: none\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"
"X-Generator: Weblate 5.15.2\n"

#. module: mail_no_user_assign_notification
#: model:ir.model,name:mail_no_user_assign_notification.model_mail_thread
msgid "Email Thread"
msgstr "E-Mail-Thread"
23 changes: 23 additions & 0 deletions mail_no_user_assign_notification/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_no_user_assign_notification
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-30 15:32+0000\n"
"PO-Revision-Date: 2024-05-30 17:33+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 3.0.1\n"

#. module: mail_no_user_assign_notification
#: model:ir.model,name:mail_no_user_assign_notification.model_mail_thread
msgid "Email Thread"
msgstr "Hilo de mensajes"
22 changes: 22 additions & 0 deletions mail_no_user_assign_notification/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_no_user_assign_notification
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-04-05 08:50+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\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"
"X-Generator: Weblate 5.10.2\n"

#. module: mail_no_user_assign_notification
#: model:ir.model,name:mail_no_user_assign_notification.model_mail_thread
msgid "Email Thread"
msgstr "Discussione e-mail"
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_no_user_assign_notification
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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: mail_no_user_assign_notification
#: model:ir.model,name:mail_no_user_assign_notification.model_mail_thread
msgid "Email Thread"
msgstr ""
3 changes: 3 additions & 0 deletions mail_no_user_assign_notification/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import mail_thread
24 changes: 24 additions & 0 deletions mail_no_user_assign_notification/models/mail_thread.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2024 Tecnativa - Víctor Martínez
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import models


class MailThread(models.AbstractModel):
_inherit = "mail.thread"

def _message_auto_subscribe_followers(self, updated_values, default_subtype_ids):
"""Remove user_id from updated_values if this model has been set.
This will prevent the user from auto subscrube to records on creation and/or
assignment."""
if updated_values.get("user_id"):
icp = self.sudo().env["ir.config_parameter"]
models_to_skip = icp.get_param(
"mail_no_user_assign_notification.models", ""
)
models_to_skip = [x.strip() for x in models_to_skip.split(",")]
if self._name in models_to_skip:
updated_values.pop("user_id")
return super()._message_auto_subscribe_followers(
updated_values=updated_values, default_subtype_ids=default_subtype_ids
)
3 changes: 3 additions & 0 deletions mail_no_user_assign_notification/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
8 changes: 8 additions & 0 deletions mail_no_user_assign_notification/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1. Go to Settings \> Technical \> System Parameters
2. Edit "mailno_user_assign_notification.models" key record
3. Set any model\* (for example: res.partner).

NOTE1: It is possible to set several models separated by comma (e.g.:
model1,model2).

NOTE2: The model should have the field user_id for this to be effective.
3 changes: 3 additions & 0 deletions mail_no_user_assign_notification/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Tecnativa](https://www.tecnativa.com):
- Víctor Martínez
- Pedro M. Baeza
2 changes: 2 additions & 0 deletions mail_no_user_assign_notification/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module inhibits the assignation notification from the models that
we want.
2 changes: 2 additions & 0 deletions mail_no_user_assign_notification/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- This is not valid for project tasks users assignation, as the field is
multi-relational. A specific extension would be needed.
5 changes: 5 additions & 0 deletions mail_no_user_assign_notification/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1. Go to one of the configured models (like Contacts).
2. Create or edit a record, and assign the field for the user (in
contacts, it's called "Salesperson", in purchase orders it's
"Purchase representative", etc).
3. The user won't receive the automatic assignment email.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading