diff --git a/addons/mail/static/src/components/follower_list_menu/follower_list_menu_tests.js b/addons/mail/static/src/components/follower_list_menu/follower_list_menu_tests.js index 06a4634dbee..d277bca15da 100644 --- a/addons/mail/static/src/components/follower_list_menu/follower_list_menu_tests.js +++ b/addons/mail/static/src/components/follower_list_menu/follower_list_menu_tests.js @@ -130,10 +130,6 @@ QUnit.test('click on "add followers" button', async function (assert) { 'res.partner', "'The 'add followers' action should contain thread model in context'" ); - assert.notOk( - payload.action.context.mail_invite_follower_channel_only, - "The 'add followers' action should not be restricted to channels only" - ); assert.strictEqual( payload.action.context.default_res_id, 100, diff --git a/addons/mail/static/src/models/thread/thread.js b/addons/mail/static/src/models/thread/thread.js index 93d9fd52f32..6b2c68f06ec 100644 --- a/addons/mail/static/src/models/thread/thread.js +++ b/addons/mail/static/src/models/thread/thread.js @@ -755,7 +755,7 @@ function factory(dependencies) { * Open a dialog to add partners as followers. */ promptAddPartnerFollower() { - this._promptAddFollower({ mail_invite_follower_channel_only: false }); + this._promptAddFollower(); } async refresh() { @@ -1523,10 +1523,8 @@ function factory(dependencies) { /** * @private - * @param {Object} [param0={}] - * @param {boolean} [param0.mail_invite_follower_channel_only=false] */ - _promptAddFollower({ mail_invite_follower_channel_only = false } = {}) { + _promptAddFollower() { const action = { type: 'ir.actions.act_window', res_model: 'mail.wizard.invite', @@ -1537,7 +1535,6 @@ function factory(dependencies) { context: { default_res_model: this.model, default_res_id: this.id, - mail_invite_follower_channel_only, }, }; this.env.bus.trigger('do-action', { diff --git a/addons/mail/wizard/invite.py b/addons/mail/wizard/invite.py index 28741997df6..229fa65d99f 100644 --- a/addons/mail/wizard/invite.py +++ b/addons/mail/wizard/invite.py @@ -16,8 +16,6 @@ class Invite(models.TransientModel): @api.model def default_get(self, fields): result = super(Invite, self).default_get(fields) - if self._context.get('mail_invite_follower_channel_only'): - result['send_mail'] = False if 'message' not in fields: return result @@ -42,8 +40,6 @@ class Invite(models.TransientModel): res_model = fields.Char('Related Document Model', required=True, index=True, help='Model of the followed resource') res_id = fields.Integer('Related Document ID', index=True, help='Id of the followed resource') partner_ids = fields.Many2many('res.partner', string='Recipients', help="List of partners that will be added as follower of the current document.") - channel_ids = fields.Many2many('mail.channel', string='Channels', help='List of channels that will be added as listeners of the current document.', - domain=[('channel_type', '=', 'channel')]) message = fields.Html('Message') send_mail = fields.Boolean('Send Email', default=True, help="If checked, the partners will receive an email warning they have been added in the document's followers.") diff --git a/addons/mail/wizard/invite_view.xml b/addons/mail/wizard/invite_view.xml index aa8633d225d..9b35c27ed16 100644 --- a/addons/mail/wizard/invite_view.xml +++ b/addons/mail/wizard/invite_view.xml @@ -13,13 +13,8 @@ - - + context="{'force_email':True, 'show_email':True}"/> +