summaryrefslogtreecommitdiff
path: root/addons/mail/data
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-02-06 09:50:38 +0000
committerSébastien Theys <seb@odoo.com>2019-02-06 09:50:38 +0000
commitc1be1993f9bcd11f3fdff78e81ea71e518c15779 (patch)
tree72045b536b781e963e4e6354b9ff84ceb20a5fbf /addons/mail/data
parent3b256ba487df8ed3ef28eddec25af75ce3be4677 (diff)
[FIX] *: share URL on the correct website if possible
* = base, auth_signup, mail, portal, sale, website, website_sale Before this commit, sending an object by email would always link to web.base.url even if the object was created from a specific website. Now if the object has a website, we use the URL of that website if it is set. The fallback will always be on the web.base.url. opw-1921030 PR: #30000
Diffstat (limited to 'addons/mail/data')
-rw-r--r--addons/mail/data/mail_data.xml4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml
index b65ddd02efa..e313f7538f4 100644
--- a/addons/mail/data/mail_data.xml
+++ b/addons/mail/data/mail_data.xml
@@ -231,7 +231,9 @@
<td align="center" style="min-width: 590px;">
<t t-set="access_action" t-value="record.with_context(force_website=True).get_access_action()"/>
<t t-set="is_online" t-value="access_action and access_action['type'] == 'ir.actions.act_url'"/>
- <t t-set="access_url" t-value="is_online and record._get_share_url(redirect=True, signup_partner=True) or ''"/>
+ <t t-set="base_url" t-value="record.get_base_url()"/>
+ <t t-set="share_url" t-value="record._get_share_url(redirect=True, signup_partner=True)"/>
+ <t t-set="access_url" t-value="is_online and share_url and base_url + share_url or ''"/>
<t t-set="access_name">
View <t t-esc="model_description or 'document'"/>
</t>