[IMP] mail: add default explicitly in channel_create to be more clear

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) <seb@odoo.com>
This commit is contained in:
Zelong Lin
2022-02-18 13:26:55 +00:00
parent 0862f2fab0
commit ec0109b7b2
+1
View File
@@ -1073,6 +1073,7 @@ class Channel(models.Model):
"""
# create the channel
new_channel = self.create({
'channel_type': 'channel',
'name': name,
'public': privacy,
})