[MIG] mail_activity_creator: Migration to 13.0

This commit is contained in:
Joan Mateu Jordi 2021-11-16 09:18:44 +01:00
parent 5f61826c36
commit 68e7434e61
2 changed files with 4 additions and 5 deletions

View File

@ -5,7 +5,7 @@
"name": "Mail Activity Creator",
"summary": """
Show activities creator""",
"version": "11.0.1.0.0",
"version": "13.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social",

View File

@ -1,7 +1,7 @@
# Copyright 2020 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.models import SUPERUSER_ID
from odoo.tests.common import TransactionCase
@ -21,7 +21,7 @@ class TestCreator(TransactionCase):
self.activity_type = self.env["mail.activity.type"].create(
{
"name": "Initial Contact",
"days": 5,
"delay_count": 5,
"summary": "ACT 1 : Presentation, barbecue, ... ",
"res_model_id": self.model_id,
}
@ -30,7 +30,7 @@ class TestCreator(TransactionCase):
def test_activity_creator(self):
activity = (
self.env["mail.activity"]
.sudo(self.user_01.id)
.with_user(self.user_01.id)
.create(
{
"activity_type_id": self.activity_type.id,
@ -42,4 +42,3 @@ class TestCreator(TransactionCase):
)
)
self.assertEqual(activity.creator_uid, self.user_01)
self.assertEqual(activity.create_uid.id, SUPERUSER_ID)