diff options
| author | XavierDo <xdo@odoo.com> | 2018-09-20 11:47:02 +0200 |
|---|---|---|
| committer | XavierDo <xdo@odoo.com> | 2018-09-20 12:42:33 +0200 |
| commit | f7957fb6aaddbcd7986a3d8a8eb2746d9569d0b9 (patch) | |
| tree | 27da02cdaea481b53babe89c512ca77a3f4362e3 /addons/mail/static/src | |
| parent | a0ce697b0550f412f93f0dbcb8a3c8aea4d23651 (diff) | |
[FIX] mail: prevent redirect to app switcher
Before this commit, trying to send or preview a mail from a kanban view was
redirecting to the appswitcher.
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/js/activity.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/activity.js b/addons/mail/static/src/js/activity.js index 65a4f0a6f2e..b1f43e495c7 100644 --- a/addons/mail/static/src/js/activity.js +++ b/addons/mail/static/src/js/activity.js @@ -371,6 +371,8 @@ var BasicActivity = AbstractField.extend({ */ _onPreviewMailTemplate: function (ev) { ev.stopPropagation(); + ev.preventDefault(); + var self = this; var templateID = $(ev.currentTarget).data('template-id'); var action = { name: _t('Compose Email'), @@ -386,7 +388,9 @@ var BasicActivity = AbstractField.extend({ force_email: true, }, }; - return this.do_action(action, { on_close: function () {} }); + return this.do_action(action, { on_close: function () { + self.trigger_up('reload'); + } }); }, /** * @private @@ -395,6 +399,7 @@ var BasicActivity = AbstractField.extend({ */ _onSendMailTemplate: function (ev) { ev.stopPropagation(); + ev.preventDefault(); var templateID = $(ev.currentTarget).data('template-id'); return this._rpc({ model: this.model, |
