[MIG] mail_autosubscribe: Migration to 15.0
This commit is contained in:
parent
a54bba3e83
commit
72d7608881
@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Mail Autosubscribe",
|
"name": "Mail Autosubscribe",
|
||||||
"summary": "Automatically subscribe partners to its company's business documents",
|
"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)",
|
"author": "Camptocamp SA, Odoo Community Association (OCA)",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"category": "Marketing",
|
"category": "Marketing",
|
||||||
|
@ -8,7 +8,7 @@ from odoo import models
|
|||||||
class MailThread(models.AbstractModel):
|
class MailThread(models.AbstractModel):
|
||||||
_inherit = "mail.thread"
|
_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.
|
# Overload to automatically subscribe autosubscribe followers.
|
||||||
autosubscribe_followers = not self.env.context.get("no_autosubscribe_followers")
|
autosubscribe_followers = not self.env.context.get("no_autosubscribe_followers")
|
||||||
if partner_ids and autosubscribe_followers:
|
if partner_ids and autosubscribe_followers:
|
||||||
@ -22,6 +22,5 @@ class MailThread(models.AbstractModel):
|
|||||||
partner_ids += follower_ids
|
partner_ids += follower_ids
|
||||||
return super().message_subscribe(
|
return super().message_subscribe(
|
||||||
partner_ids=partner_ids,
|
partner_ids=partner_ids,
|
||||||
channel_ids=channel_ids,
|
|
||||||
subtype_ids=subtype_ids,
|
subtype_ids=subtype_ids,
|
||||||
)
|
)
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
from odoo_test_helper import FakeModelLoader
|
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")
|
@tagged("post_install", "-at_install")
|
||||||
class TestMailAutosubscribe(SavepointCase):
|
class TestMailAutosubscribe(TransactionCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super().setUpClass()
|
super().setUpClass()
|
||||||
|
Loading…
Reference in New Issue
Block a user