[MIG] mail_autosubscribe: Migration to 15.0

This commit is contained in:
nicolas 2022-04-12 08:43:56 -03:00
parent a54bba3e83
commit 72d7608881
3 changed files with 4 additions and 5 deletions

View File

@ -5,7 +5,7 @@
{
"name": "Mail Autosubscribe",
"summary": "Automatically subscribe partners to its company's business documents",
"version": "14.0.1.0.0",
"version": "15.0.1.0.0",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Marketing",

View File

@ -8,7 +8,7 @@ from odoo import models
class MailThread(models.AbstractModel):
_inherit = "mail.thread"
def message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None):
def message_subscribe(self, partner_ids=None, subtype_ids=None):
# Overload to automatically subscribe autosubscribe followers.
autosubscribe_followers = not self.env.context.get("no_autosubscribe_followers")
if partner_ids and autosubscribe_followers:
@ -22,6 +22,5 @@ class MailThread(models.AbstractModel):
partner_ids += follower_ids
return super().message_subscribe(
partner_ids=partner_ids,
channel_ids=channel_ids,
subtype_ids=subtype_ids,
)

View File

@ -4,11 +4,11 @@
from odoo_test_helper import FakeModelLoader
from odoo.tests.common import Form, SavepointCase, tagged
from odoo.tests.common import Form, TransactionCase, tagged
@tagged("post_install", "-at_install")
class TestMailAutosubscribe(SavepointCase):
class TestMailAutosubscribe(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()