diff --git a/mail_restrict_follower_selection/__manifest__.py b/mail_restrict_follower_selection/__manifest__.py index 3911502..73feb2d 100644 --- a/mail_restrict_follower_selection/__manifest__.py +++ b/mail_restrict_follower_selection/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Restrict follower selection", - "version": "13.0.1.0.0", + "version": "13.0.1.0.1", "author": "Therp BV,Creu Blanca,Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Social Network", diff --git a/mail_restrict_follower_selection/models/mail_thread.py b/mail_restrict_follower_selection/models/mail_thread.py index 0193079..65e616a 100644 --- a/mail_restrict_follower_selection/models/mail_thread.py +++ b/mail_restrict_follower_selection/models/mail_thread.py @@ -1,4 +1,5 @@ from odoo import models +from odoo.tools import config from odoo.tools.safe_eval import safe_eval @@ -11,6 +12,11 @@ class MailThread(models.AbstractModel): result = super(MailThread, self)._message_add_suggested_recipient( result, partner=partner, email=email, reason=reason ) + test_condition = config["test_enable"] and not self.env.context.get( + "test_restrict_follower" + ) + if test_condition or self.env.context.get("no_restrict_follower"): + return result domain = self.env[ "mail.wizard.invite" ]._mail_restrict_follower_selection_get_domain()