From 017f738c5d2a2effd1a4a43ca3252b8c5ca03a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Mon, 27 Sep 2021 10:13:06 +0000 Subject: [PATCH] [FIX] mail: Cannot read property "rtc" of undefined Also resulted in crash `Cannot read property 'sel' of undefined`. This commit adds some guards in some component templates that access model records and their fields, to avoid crashes. These guards are necessary due to the asynchronous rendering of OWL, which makes it vulnerable to risky changes in models such as record deletion or any modifcation in any relational fields. Introduced with https://github.com/odoo/odoo/commit/9bf4b6c29207b97368f27098df3cfbe79e2b5f0f closes odoo/odoo#77258 X-original-commit: 1dbf02ea72aa0599991f05ff2d9d4f4517055eca Signed-off-by: Christophe Monniez (moc) --- .../rtc_activity_notice.xml | 28 ++++++++++--------- .../rtc_controller/rtc_controller.xml | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/addons/mail/static/src/components/rtc_activity_notice/rtc_activity_notice.xml b/addons/mail/static/src/components/rtc_activity_notice/rtc_activity_notice.xml index f42a7c8dc2a..5379d073179 100644 --- a/addons/mail/static/src/components/rtc_activity_notice/rtc_activity_notice.xml +++ b/addons/mail/static/src/components/rtc_activity_notice/rtc_activity_notice.xml @@ -3,19 +3,21 @@
  • - - - Open conference: - -
    - - -
    -
    + + + + Open conference: + +
    + + +
    +
    +
  • diff --git a/addons/mail/static/src/components/rtc_controller/rtc_controller.xml b/addons/mail/static/src/components/rtc_controller/rtc_controller.xml index 2165aaf4a69..bcf4d087d7a 100644 --- a/addons/mail/static/src/components/rtc_controller/rtc_controller.xml +++ b/addons/mail/static/src/components/rtc_controller/rtc_controller.xml @@ -3,7 +3,7 @@
    - +
    Unmute