From 894a5a6c68b0f26766aef12e03bbc71f59cc4e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Fri, 4 Mar 2022 16:43:21 +0000 Subject: [PATCH] [FIX] mail: make default mode for channel 'groups', not 'public' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's currently confusing: the default value is already 'groups', but the create method is actually giving another default. task-2749643 closes odoo/odoo#86075 X-original-commit: 31dfc797bc0fb163b6e32d3fe2195791b674f00c Signed-off-by: Alexandre Kühn (aku) --- addons/mail/models/mail_channel.py | 2 +- addons/mail/static/src/models/discuss/discuss.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py index 0d388134eb6..7b9ddef41cc 100644 --- a/addons/mail/models/mail_channel.py +++ b/addons/mail/models/mail_channel.py @@ -1065,7 +1065,7 @@ class Channel(models.Model): self.add_members(self.env.user.partner_id.ids) @api.model - def channel_create(self, name, privacy='public'): + def channel_create(self, name, privacy='groups'): """ Create a channel and add the current partner, broadcast it (to make the user directly listen to it when polling) :param name : the name of the channel to create diff --git a/addons/mail/static/src/models/discuss/discuss.js b/addons/mail/static/src/models/discuss/discuss.js index 5944f1ca642..bc82af44bea 100644 --- a/addons/mail/static/src/models/discuss/discuss.js +++ b/addons/mail/static/src/models/discuss/discuss.js @@ -40,7 +40,7 @@ registerModel({ const channel = await this.async(() => this.messaging.models['Thread'].performRpcCreateChannel({ name, - privacy: ui.item.special, + privacy: ui.item.special === 'private' ? 'private' : 'groups', }) ); channel.open();