[FIX] mail: activities in lost opportunities should appear

Before this commit:
Activities made on the archived record are not shown in the activity
system-tray menu.

After this commit:
Activities made on the archived record are shown in the system-tray
activity menu.

task-3458597

closes odoo/odoo#146462

X-original-commit: d6d91b4f86d3d0ef954160a9de6e42a1bc4e184f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
maad-odoo
2023-12-18 09:31:43 +00:00
parent 304a6caa14
commit d4505666c3
@@ -743,6 +743,27 @@ class TestActivityMixin(TestActivityCommon):
self.assertEqual(test_record_1, record)
@tests.tagged('mail_activity')
class TestActivitySystray(TestActivityCommon):
"""Test for systray_get_activities"""
def test_systray_activities_for_archived_records(self):
"""Check that activities made on archived records are shown in the
systray activities. """
test_record = self.test_record.with_user(self.user_employee)
test_record.action_archive()
test_record.activity_schedule(
'test_mail.mail_act_test_todo',
user_id=self.env.user.id,
)
total_count = sum(
record['total_count'] for record in self.env.user.systray_get_activities()
if record.get('model') == test_record._name
)
self.assertEqual(total_count, 1)
@tests.tagged('mail_activity')
class TestActivityViewHelpers(TestActivityCommon):
@classmethod