summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/activity/activity.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2020-08-31 14:15:58 +0000
committerAlexandre Kühn <aku@odoo.com>2020-09-01 11:00:57 +0000
commitb020e45832a967213c4ea4ae28b3a3d4d0c4e7f3 (patch)
treeaafbe238b4ca85a0d685b2db2e9f9b0643b9faa7 /addons/mail/static/src/components/activity/activity.js
parent57665a02f7b4cd113f8f40ec47c58a518fe8669c (diff)
[FIX] mail: message/activity link with dataset oe-id and oe-model
Task-2328718 closes odoo/odoo#56864 X-original-commit: 430aa0c2ffe242992fb935733d81f6e05a6d2458 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/activity/activity.js')
-rw-r--r--addons/mail/static/src/components/activity/activity.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/addons/mail/static/src/components/activity/activity.js b/addons/mail/static/src/components/activity/activity.js
index 6c70f876160..45fb2d12a8e 100644
--- a/addons/mail/static/src/components/activity/activity.js
+++ b/addons/mail/static/src/components/activity/activity.js
@@ -134,6 +134,25 @@ class Activity extends Component {
* @private
* @param {MouseEvent} ev
*/
+ _onClick(ev) {
+ if (
+ ev.target.tagName === 'A' &&
+ ev.target.dataset.oeId &&
+ ev.target.dataset.oeModel
+ ) {
+ this.env.messaging.openProfile({
+ id: Number(ev.target.dataset.oeId),
+ model: ev.target.dataset.oeModel,
+ });
+ // avoid following dummy href
+ ev.preventDefault();
+ }
+ }
+
+ /**
+ * @private
+ * @param {MouseEvent} ev
+ */
_onClickCancel(ev) {
ev.preventDefault();
this.activity.deleteServerRecord();