From 9da5f6e0f69c7724b60892379e23d46c16a4b170 Mon Sep 17 00:00:00 2001 From: Renaud Thiry Date: Tue, 4 Jul 2023 12:48:25 +0000 Subject: [PATCH] [FIX] mail: no default alias owner Before this change aliases were assigned to the user creating them The purpose was originally to reduce the number of records created by odoobot however this leads to unexpected behavior for the users who just wanted to create an alias without fuss We make remove the default user such that any automated record modification/creation will be applied by root instead of some arbitrary user. task-3383275 X-original-commit: 3edf18168b92545fc29e078a155494f2781adff6 Part-of: odoo/odoo#130798 --- addons/mail/models/mail_alias.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/models/mail_alias.py b/addons/mail/models/mail_alias.py index 5982ffb119f..d949bd1312c 100644 --- a/addons/mail/models/mail_alias.py +++ b/addons/mail/models/mail_alias.py @@ -42,7 +42,7 @@ class Alias(models.Model): # hack to only allow selecting mail_thread models (we might # (have a few false positives, though) domain="[('field_id.name', '=', 'message_ids')]") - alias_user_id = fields.Many2one('res.users', 'Owner', default=lambda self: self.env.user, + alias_user_id = fields.Many2one('res.users', 'Owner', help="The owner of records created upon receiving emails on this alias. " "If this field is not set the system will attempt to find the right owner " "based on the sender (From) address, or will use the Administrator account "