diff --git a/addons/mail/static/src/models/notification_request_view.js b/addons/mail/static/src/models/notification_request_view.js index 13e0a707738..c7cd26be35f 100644 --- a/addons/mail/static/src/models/notification_request_view.js +++ b/addons/mail/static/src/models/notification_request_view.js @@ -28,7 +28,7 @@ registerModel({ * @returns {FieldCommand} */ _computePersonaImStatusIconView() { - return this.messaging.partnerRoot.isImStatusSet ? insertAndReplace() : clear(); + return this.messaging.partnerRoot && this.messaging.partnerRoot.isImStatusSet ? insertAndReplace() : clear(); }, }, fields: { diff --git a/addons/mail/static/tests/helpers/test_utils.js b/addons/mail/static/tests/helpers/test_utils.js index d9cf11d2443..bf2ac8d528f 100644 --- a/addons/mail/static/tests/helpers/test_utils.js +++ b/addons/mail/static/tests/helpers/test_utils.js @@ -564,7 +564,7 @@ async function start(param0 = {}) { pyEnv.mockServer = MockServer.currentMockServer; const openView = async (action, options) => { action['type'] = action['type'] || 'ir.actions.act_window'; - return doAction(webClient, action, { props: options }); + await afterNextRender(() => doAction(webClient, action, { props: options })); }; await waitUntilEventPromise; return {