From d32865aa91bf32a88e50f17e09eb1d10abe44d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Fri, 1 Jul 2022 12:14:39 +0000 Subject: [PATCH] [IMP] mail: introduce messaging variable in form renderer code It is used in enterprise to further clean up the code. Part of task-2871070 Part-of: odoo/odoo#95085 --- addons/mail/static/src/widgets/form_renderer/form_renderer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/mail/static/src/widgets/form_renderer/form_renderer.js b/addons/mail/static/src/widgets/form_renderer/form_renderer.js index d6d346723ab..c343f560d2b 100644 --- a/addons/mail/static/src/widgets/form_renderer/form_renderer.js +++ b/addons/mail/static/src/widgets/form_renderer/form_renderer.js @@ -25,6 +25,10 @@ FormRenderer.include({ this.hasAttachmentViewerFeature = params.hasAttachmentViewerFeature; this.chatterFields = params.chatterFields; this.mailFields = params.mailFields; + this.messaging = undefined; + if (owl.Component.env.services.messaging) { + owl.Component.env.services.messaging.get().then(messaging => this.messaging = messaging); + } this._chatterContainerComponent = undefined; /** * The target of chatter, if chatter has to be appended to the DOM.