From e1d38153487f8c8675a8105825a2a0d746adee3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Tue, 7 Dec 2021 17:29:10 +0000 Subject: [PATCH] [FIX] mail: avoid costly debug operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These errors should not happen in production, it is only helpful for debugging. The opportunity is taken to limit our debug code to a messaging specific debug, as debug '1' is used in production to see extra features, and debug 'assets' is necessary to get decent stack trace. The easiest way to enable this debug mode at the time of this commit is to either manually set the value to true in the code, or to type the following line in the browser console if editing the code is not an option: `odoo.__DEBUG__.messaging.modelManager.isDebug = true;` Part of task-2702450 closes odoo/odoo#81075 X-original-commit: f9ae7510c8adaa83379b90f798ee535ede99be25 Signed-off-by: Sébastien Theys (seb) Signed-off-by: Alexandre Kühn (aku) --- .../rtc_option_list/rtc_option_list.xml | 2 +- addons/mail/static/src/model/model_field.js | 10 +++++++--- addons/mail/static/src/model/model_manager.js | 16 ++++++++++++---- addons/mail/static/src/models/rtc/rtc.js | 2 +- addons/mail/static/src/utils/test_utils.js | 8 ++++++++ 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/addons/mail/static/src/components/rtc_option_list/rtc_option_list.xml b/addons/mail/static/src/components/rtc_option_list/rtc_option_list.xml index a45c0e9a922..9bdd00765bf 100644 --- a/addons/mail/static/src/components/rtc_option_list/rtc_option_list.xml +++ b/addons/mail/static/src/components/rtc_option_list/rtc_option_list.xml @@ -24,7 +24,7 @@ Settings - +