From ec0109b7b22c15e306333ed97a9d9d795454332d Mon Sep 17 00:00:00 2001 From: Zelong Lin Date: Thu, 17 Feb 2022 14:59:11 +0000 Subject: [PATCH] [IMP] mail: add default explicitly in channel_create to be more clear MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Specify 'channel_type' explicitly in channel_create. This makes the method more clear and decoupling from default value. Once the default values changes, the method can work as expected as well. task-2767635 closes odoo/odoo#84867 Signed-off-by: Sébastien Theys (seb) --- addons/mail/models/mail_channel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py index a0200762e81..b5375e16fd3 100644 --- a/addons/mail/models/mail_channel.py +++ b/addons/mail/models/mail_channel.py @@ -1073,6 +1073,7 @@ class Channel(models.Model): """ # create the channel new_channel = self.create({ + 'channel_type': 'channel', 'name': name, 'public': privacy, })