From 4d56255d736bf695dbba0e61c2cc477f6db560e0 Mon Sep 17 00:00:00 2001 From: "Louis Wicket (wil)" Date: Tue, 14 Dec 2021 13:50:26 +0000 Subject: [PATCH] [IMP] mail: rename rtc layout menu model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename javascript model `mail.rtc_layout_menu` to `RtcLayoutMenu` in order to distinguish javascript models from python models. Part of task-2701674. closes odoo/odoo#81413 Signed-off-by: Alexandre Kühn (aku) --- .../src/components/rtc_layout_menu/rtc_layout_menu.js | 6 +++--- .../static/src/models/rtc_call_viewer/rtc_call_viewer.js | 2 +- .../static/src/models/rtc_layout_menu/rtc_layout_menu.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/mail/static/src/components/rtc_layout_menu/rtc_layout_menu.js b/addons/mail/static/src/components/rtc_layout_menu/rtc_layout_menu.js index 7baf1429ea3..26bc484a5db 100644 --- a/addons/mail/static/src/components/rtc_layout_menu/rtc_layout_menu.js +++ b/addons/mail/static/src/components/rtc_layout_menu/rtc_layout_menu.js @@ -12,7 +12,7 @@ export class RtcLayoutMenu extends Component { */ setup() { super.setup(); - useComponentToModel({ fieldName: 'component', modelName: 'mail.rtc_layout_menu', propNameAsRecordLocalId: 'localId' }); + useComponentToModel({ fieldName: 'component', modelName: 'RtcLayoutMenu', propNameAsRecordLocalId: 'localId' }); } //-------------------------------------------------------------------------- @@ -20,10 +20,10 @@ export class RtcLayoutMenu extends Component { //-------------------------------------------------------------------------- /** - * @returns {mail.rtc_layout_menu} + * @returns {RtcLayoutMenu} */ get layoutMenu() { - return this.messaging && this.messaging.models['mail.rtc_layout_menu'].get(this.props.localId); + return this.messaging && this.messaging.models['RtcLayoutMenu'].get(this.props.localId); } } diff --git a/addons/mail/static/src/models/rtc_call_viewer/rtc_call_viewer.js b/addons/mail/static/src/models/rtc_call_viewer/rtc_call_viewer.js index dd9185bcdf3..951af98d191 100644 --- a/addons/mail/static/src/models/rtc_call_viewer/rtc_call_viewer.js +++ b/addons/mail/static/src/models/rtc_call_viewer/rtc_call_viewer.js @@ -373,7 +373,7 @@ registerModel({ /** * The model for the menu to control the layout of the viewer. */ - rtcLayoutMenu: one2one('mail.rtc_layout_menu', { + rtcLayoutMenu: one2one('RtcLayoutMenu', { inverse: 'callViewer', isCausal: true, }), diff --git a/addons/mail/static/src/models/rtc_layout_menu/rtc_layout_menu.js b/addons/mail/static/src/models/rtc_layout_menu/rtc_layout_menu.js index eca3c55511c..14b2a5841bf 100644 --- a/addons/mail/static/src/models/rtc_layout_menu/rtc_layout_menu.js +++ b/addons/mail/static/src/models/rtc_layout_menu/rtc_layout_menu.js @@ -5,7 +5,7 @@ import { attr, one2one } from '@mail/model/model_field'; import { clear } from '@mail/model/model_field_command'; registerModel({ - name: 'mail.rtc_layout_menu', + name: 'RtcLayoutMenu', identifyingFields: ['callViewer'], lifecycleHooks: { _created() {