diff options
| author | Romeo Fragomeli <rfr@odoo.com> | 2019-10-30 09:11:52 +0000 |
|---|---|---|
| committer | Romeo Fragomeli <rfr@odoo.com> | 2019-12-02 09:10:34 +0000 |
| commit | ecc028c0e8dee8f1c85e750d625061e66a691d4e (patch) | |
| tree | 72debe92f7a766e84d9f525b465994609706dd1a /addons/mail/models/mail_thread.py | |
| parent | a82fd088137fbed23c66af525e98807b53828c4f (diff) | |
[IMP] mail: use _notify_get_action_link and not inline string
Note that this also add data-oe-model and data-oe-id in XML.
This allow us to avoid to load these links as external URL when
a user receive it in inbox instead of external mail client.
See file addons/mail/static/src/js/thread_widget.js -> _onClickRedirect
Task ID: 1895451
closes odoo/odoo#39958
Related: odoo/enterprise#6414
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Diffstat (limited to 'addons/mail/models/mail_thread.py')
| -rw-r--r-- | addons/mail/models/mail_thread.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index f3f703666b3..89b6818bc64 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -2812,6 +2812,7 @@ class MailThread(models.AbstractModel): values = { 'object': record, 'model_description': model_description, + 'access_link': self._notify_get_action_link('view'), } assignation_msg = view.render(values, engine='ir.qweb', minimal_qcontext=True) assignation_msg = self.env['mail.thread']._replace_local_links(assignation_msg) |
