[FIX] tracking_manager: Fix test related to ir.actions.act_window

Related to cac20c5f2f

Now it is necessary to have an ir.actions.act_window record
pull/3112/head
Víctor Martínez 2024-11-07 13:07:29 +01:00
parent 935789fe68
commit b761ddd918
1 changed files with 4 additions and 14 deletions

View File

@ -196,21 +196,11 @@ class TestTrackingManager(TransactionCase):
self.assertEqual(self.messages.body.count("Changed"), 1)
def test_o2m_update_m2o_indirectly(self):
self.partner.write(
{
"user_ids": [
(
1,
self.partner.user_ids[0].id,
{
"action_id": self.env["ir.actions.actions"]
.create({"name": "test", "type": "ir.actions.act_window"})
.id
},
),
]
}
user = self.partner.user_ids[0]
action = self.env["ir.actions.act_window"].create(
{"name": "test", "type": "ir.actions.act_window", "res_model": user._name}
)
self.partner.write({"user_ids": [(1, user.id, {"action_id": action.id})]})
self.assertEqual(len(self.messages), 1)
self.assertEqual(self.messages.body.count("Changed"), 1)