From f9e7a34ef7444857e35bbd0caaa8d61a86a2ddbf Mon Sep 17 00:00:00 2001 From: tsm-odoo Date: Mon, 17 Oct 2022 13:37:26 +0000 Subject: [PATCH] [IMP] mail: remove owl bus on/off MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are deprecated since Owl 2, and lead to memory leak in the compatibility layer. This PR removes the last ones in the mail code. task-2877316 closes odoo/odoo#103301 Related: odoo/enterprise#32842 Signed-off-by: Alexandre Kühn (aku) --- .../tests/qunit_suite_tests/components/discuss_tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mail/static/tests/qunit_suite_tests/components/discuss_tests.js b/addons/mail/static/tests/qunit_suite_tests/components/discuss_tests.js index 8916485236f..9c2e21954cf 100644 --- a/addons/mail/static/tests/qunit_suite_tests/components/discuss_tests.js +++ b/addons/mail/static/tests/qunit_suite_tests/components/discuss_tests.js @@ -3361,7 +3361,7 @@ QUnit.test('receive new chat message: out of odoo focus (notification, channel)' }, }); await openDiscuss(); - env.bus.on('set_title_part', null, payload => { + env.bus.addEventListener('set_title_part', ({ detail: payload }) => { assert.step('set_title_part'); assert.strictEqual(payload.part, '_chat'); assert.strictEqual(payload.title, "1 Message"); @@ -3393,7 +3393,7 @@ QUnit.test('receive new chat message: out of odoo focus (notification, chat)', a }, }); await openDiscuss(); - env.bus.on('set_title_part', null, payload => { + env.bus.addEventListener('set_title_part', ({ detail: payload }) => { assert.step('set_title_part'); assert.strictEqual(payload.part, '_chat'); assert.strictEqual(payload.title, "1 Message"); @@ -3429,7 +3429,7 @@ QUnit.test('receive new chat messages: out of odoo focus (tab title)', async fun }, }); await openDiscuss(); - env.bus.on('set_title_part', null, payload => { + env.bus.addEventListener('set_title_part', ({ detail: payload }) => { step++; assert.step('set_title_part'); assert.strictEqual(payload.part, '_chat');