From 6bd65a50d2b84395277b67e9abaed3dcb65f5f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Tue, 22 Mar 2022 17:43:34 +0000 Subject: [PATCH] [IMP] mail: turn 'FollowerSubtypeView/subtype' into field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-2793280 closes odoo/odoo#87013 Signed-off-by: Alexandre Kühn (aku) --- .../components/follower_subtype/follower_subtype.js | 12 ++---------- .../components/follower_subtype/follower_subtype.xml | 4 ++-- .../follower_subtype_list/follower_subtype_list.xml | 1 - 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/addons/mail/static/src/components/follower_subtype/follower_subtype.js b/addons/mail/static/src/components/follower_subtype/follower_subtype.js index e33eb5286f8..2009a4fa3b0 100644 --- a/addons/mail/static/src/components/follower_subtype/follower_subtype.js +++ b/addons/mail/static/src/components/follower_subtype/follower_subtype.js @@ -17,13 +17,6 @@ export class FollowerSubtype extends Component { return this.messaging && this.messaging.models['Follower'].get(this.props.followerLocalId); } - /** - * @returns {FollowerSubtype} - */ - get followerSubtype() { - return this.messaging && this.messaging.models['FollowerSubtype'].get(this.props.followerSubtypeLocalId); - } - /** * @returns {FollowerSubtypeView} */ @@ -43,9 +36,9 @@ export class FollowerSubtype extends Component { */ _onChangeCheckbox(ev) { if (ev.target.checked) { - this.follower.selectSubtype(this.followerSubtype); + this.follower.selectSubtype(this.followerSubtypeView.subtype); } else { - this.follower.unselectSubtype(this.followerSubtype); + this.follower.unselectSubtype(this.followerSubtypeView.subtype); } } @@ -54,7 +47,6 @@ export class FollowerSubtype extends Component { Object.assign(FollowerSubtype, { props: { followerLocalId: String, - followerSubtypeLocalId: String, localId: String, }, template: 'mail.FollowerSubtype', diff --git a/addons/mail/static/src/components/follower_subtype/follower_subtype.xml b/addons/mail/static/src/components/follower_subtype/follower_subtype.xml index 8373ab19a52..d99edc4ed1a 100644 --- a/addons/mail/static/src/components/follower_subtype/follower_subtype.xml +++ b/addons/mail/static/src/components/follower_subtype/follower_subtype.xml @@ -5,8 +5,8 @@
diff --git a/addons/mail/static/src/components/follower_subtype_list/follower_subtype_list.xml b/addons/mail/static/src/components/follower_subtype_list/follower_subtype_list.xml index da56207f59c..cf814885081 100644 --- a/addons/mail/static/src/components/follower_subtype_list/follower_subtype_list.xml +++ b/addons/mail/static/src/components/follower_subtype_list/follower_subtype_list.xml @@ -18,7 +18,6 @@ className="'o_FollowerSubtypeList_subtype'" localId="followerSubtypeView.localId" followerLocalId="followerSubtypeList.follower.localId" - followerSubtypeLocalId="followerSubtypeView.subtype.localId" />