diff --git a/crm_request/models/request.py b/crm_request/models/request.py index 201741dc9..b473c1fb8 100644 --- a/crm_request/models/request.py +++ b/crm_request/models/request.py @@ -220,7 +220,12 @@ def message_new(self, msg, custom_values=None): defaults.pop("name", False) defaults.update(custom_values) - request_id = super().message_new(msg, defaults) + # The responsible set by the e-mail alias follows the request and gets + # the incoming e-mail itself: no separate "You have been assigned" + # e-mail on top of it (T3647). Assigning by hand still sends it. + request_id = super( + CrmClaim, self.with_context(mail_auto_subscribe_no_notify=True) + ).message_new(msg, defaults) request = self.browse(request_id.id) if not request.language: request.language = ( @@ -234,7 +239,7 @@ def message_new(self, msg, custom_values=None): except Exception as e: _logger.error(f"The automatic mail failed\n{e}") - return request_id + return request def message_update(self, msg_dict, update_vals=None): """Change the stage to "Waiting on support" when the customer writes a diff --git a/crm_request/tests/__init__.py b/crm_request/tests/__init__.py index da65f0539..91f23880f 100644 --- a/crm_request/tests/__init__.py +++ b/crm_request/tests/__init__.py @@ -8,4 +8,9 @@ # ############################################################################## -from . import test_crm_claim_categories, test_crm_claim_request, test_my_profile +from . import ( + test_crm_claim_categories, + test_crm_claim_request, + test_my_profile, + test_request_notifications, +) diff --git a/crm_request/tests/test_request_notifications.py b/crm_request/tests/test_request_notifications.py new file mode 100644 index 000000000..70458f1cc --- /dev/null +++ b/crm_request/tests/test_request_notifications.py @@ -0,0 +1,93 @@ +############################################################################## +# +# Copyright (C) 2026 Compassion CH (http://www.compassion.ch) +# Releasing children from poverty in Jesus' name +# +# The licence is in the file __manifest__.py +# +############################################################################## +from odoo.tests import TransactionCase, tagged + +EMAIL = """Return-Path: