From 3f75153ad738b90b92ced83cdc270c1d88560c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Tue, 22 Mar 2022 17:33:31 +0000 Subject: [PATCH] [IMP] mail: introduce 'FollowerSubtypeView' model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-2793280 closes odoo/odoo#87011 Signed-off-by: Alexandre Kühn (aku) --- .../follower_subtype/follower_subtype.js | 8 + .../follower_subtype/follower_subtype.xml | 4 +- .../follower_subtype_list.xml | 5 +- .../static/src/models/follower_subtype.js | 6 +- .../src/models/follower_subtype_list.js | 28 +- .../src/models/follower_subtype_view.js | 21 ++ .../components/follower_subtype_tests.js | 305 ++++++++++-------- 7 files changed, 240 insertions(+), 137 deletions(-) create mode 100644 addons/mail/static/src/models/follower_subtype_view.js 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 ceace87c04d..e33eb5286f8 100644 --- a/addons/mail/static/src/components/follower_subtype/follower_subtype.js +++ b/addons/mail/static/src/components/follower_subtype/follower_subtype.js @@ -24,6 +24,13 @@ export class FollowerSubtype extends Component { return this.messaging && this.messaging.models['FollowerSubtype'].get(this.props.followerSubtypeLocalId); } + /** + * @returns {FollowerSubtypeView} + */ + get followerSubtypeView() { + return this.messaging && this.messaging.models['FollowerSubtypeView'].get(this.props.localId); + } + //-------------------------------------------------------------------------- // Handlers //-------------------------------------------------------------------------- @@ -48,6 +55,7 @@ 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 e7056a163c0..8373ab19a52 100644 --- a/addons/mail/static/src/components/follower_subtype/follower_subtype.xml +++ b/addons/mail/static/src/components/follower_subtype/follower_subtype.xml @@ -2,8 +2,8 @@ - -
+ +