summaryrefslogtreecommitdiff
path: root/addons/hr_holidays/static/src/components/thread_view/thread_view.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/hr_holidays/static/src/components/thread_view/thread_view.js')
-rw-r--r--addons/hr_holidays/static/src/components/thread_view/thread_view.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/hr_holidays/static/src/components/thread_view/thread_view.js b/addons/hr_holidays/static/src/components/thread_view/thread_view.js
index c07ab2189a9..73ca28d4d0c 100644
--- a/addons/hr_holidays/static/src/components/thread_view/thread_view.js
+++ b/addons/hr_holidays/static/src/components/thread_view/thread_view.js
@@ -17,11 +17,10 @@ patch(components.ThreadView, 'hr_holidays/static/src/components/thread_view/thre
*/
_useStoreSelector(props) {
const res = this._super(...arguments);
- const threadView = this.env.models['mail.thread_view'].get(props.threadViewLocalId);
- const thread = threadView ? threadView.thread : undefined;
- const correspondent = thread ? thread.correspondent : undefined;
+ const thread = res.thread;
+ const correspondent = thread && thread.correspondent;
return Object.assign({}, res, {
- correspondent: correspondent ? correspondent.__state : undefined,
+ correspondentOutOfOfficeText: correspondent && correspondent.outOfOfficeText,
});
},
});