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/data/mail_data.xml | |
| 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/data/mail_data.xml')
| -rw-r--r-- | addons/mail/data/mail_data.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index f024c60b207..a83cafbbc8d 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -308,7 +308,7 @@ <span style="margin-top: 8px;">You have been assigned to the <t t-esc="model_description or 'document'"/> <t t-esc="object.display_name"/>.</span> </p> <p style="margin-top: 24px; margin-bottom: 16px;"> - <a t-att-href="'/mail/view?model=%s&res_id=%s' % (object._name, object.id)" style="background-color:#875A7B; padding: 10px; text-decoration: none; color: #fff; border-radius: 5px;"> + <a t-att-href="access_link" t-att-data-oe-model="object._name" t-att-data-oe-id="object.id" style="background-color:#875A7B; padding: 10px; text-decoration: none; color: #fff; border-radius: 5px;"> View <t t-esc="model_description or 'document'"/> </a> </p> @@ -341,7 +341,7 @@ on <span t-field="activity.res_name"/> to close for <span t-field="activity.date_deadline"/>.<br /> <p style="margin: 16px 0px 16px 0px;"> - <a t-att-href="'/mail/view?model=%s&res_id=%s' % (activity.res_model, activity.res_id)" + <a t-att-href="access_link" t-att-data-oe-model="activity.res_model" t-att-data-oe-id="activity.res_id" style="background-color:#875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;"> View <t t-esc="model_description or 'document'"/> </a> |
