[FIX] mail: wrong parameter type for add_members

The method 'add_member' has 'partner_ids' as a optional parameter , but
the thing is the test 'test_attachment_hijack' is only passing it as a
single ID off res.partner record. Let's say if somewhere we overide this
method and write something like
self.env['res.users'].search([('partner_id', 'in', partner_ids)]) , it
will fail because 'partner_ids' should be a list.

closes odoo/odoo#128759

X-original-commit: 75cb1266afa8b921f8d0ca153f5d05ad47c9b14c
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
This commit is contained in:
duongnguyen
2023-07-17 18:13:53 +02:00
parent 2391d31693
commit 3e56aab146
@@ -178,7 +178,7 @@ class TestMessageController(HttpCase):
demo = self.authenticate("demo", "demo")
channel = self.env["discuss.channel"].create({"group_public_id": None, "name": "public_channel"})
channel.add_members(
self.env["res.users"].browse(demo.uid).partner_id.id
self.env["res.users"].browse(demo.uid).partner_id.ids
) # don't care, we just need a channel where demo is follower
no_access_request = self.url_open("/web/content/" + str(att.id))
self.assertFalse(