Skip to content
Snippets Groups Projects
Commit 7e78e1f4 authored by Matheus Leal Viana (malv)'s avatar Matheus Leal Viana (malv) Committed by Maruan Aguerdouh (magm)
Browse files

[FIX] website_crm_partner_assign: fixing broken urls in mail template


Issue:
-------------------
In the lead forward mail template, there are some broken links, when we click on those links they are appended to the current url and redirect to a non-expected page.

Steps to reproduce:
-------------------
1. Go to CRM -> Create a new opportunity
2. Click on this new opportunity -> Assigned Partner
3. Select an assigned partner and click “Send Email”
4. Go to Settings -> Technical -> Emails
5. When clicking on “Partner Portal” it redirects to a non-existing page

Cause:
-------------------
The issue is happening because the urls are badly formatted and not using the correct tags

OPW-3074049

closes odoo/odoo#130300

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 801354a2
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@
<li t-foreach="ctx['partner_leads']" t-as="lead"><a t-att-href="lead['lead_link']" t-out="lead['lead_id'].name or 'Subject Undefined'">Subject Undefined</a>, <t t-out="lead['lead_id'].partner_name or lead['lead_id'].contact_name or 'Contact Name Undefined'">Contact Name Undefined</t>, <t t-out="lead['lead_id'].country_id and lead['lead_id'].country_id.name or 'Country Undefined'">Country Undefined</t>, <t t-out="lead['lead_id'].email_from or 'Email Undefined' or ''">Email Undefined</t>, <t t-out="lead['lead_id'].phone or ''">+1 650-123-4567</t> </li><br/>
</ol>
<t t-if="ctx.get('partner_in_portal')">
Please connect to your <a href="{{ record.get_portal_url() }}">Partner Portal</a> to get details. On each lead are two buttons on the top left corner that you should press after having contacted the lead: "I'm interested" &amp; "I'm not interested".<br/>
Please connect to your <a t-att-href="'%s' % (object.get_base_url())">Partner Portal</a> to get details. On each lead are two buttons on the top left corner that you should press after having contacted the lead: "I'm interested" &amp; "I'm not interested".<br/>
</t>
<t t-else="">
You do not have yet a portal access to our database. Please contact
......@@ -74,9 +74,9 @@
<tr><td valign="middle" align="left" style="opacity: 0.7;">
<t t-out="user.company_id.phone or ''">+1 650-123-4567</t>
<t t-if="user.company_id.phone and (user.company_id.email or user.company_id.website)">|</t>
<a t-if="user.company_id.email" t-attf-href="'mailto:%s' % {{ user.company_id.email }}" style="text-decoration:none; color: #454748;" t-out="user.company_id.email or ''">info@yourcompany.com</a>
<a t-if="user.company_id.email" t-att-href="'mailto:%s' % user.company_id.email" style="text-decoration:none; color: #454748;" t-out="user.company_id.email or ''">info@yourcompany.com</a>
<t t-if="user.company_id.email and user.company_id.website">|</t>
<a t-if="user.company_id.website" t-attf-href="'%s' % {{ user.company_id.website }}" style="text-decoration:none; color: #454748;" t-out="user.company_id.website or ''">http://www.example.com</a>
<a t-if="user.company_id.website" t-att-href="'%s' % user.company_id.website" style="text-decoration:none; color: #454748;" t-out="user.company_id.website or ''">http://www.example.com</a>
</td></tr>
</table>
</td>
......
......@@ -247,7 +247,7 @@ msgid ""
" <li t-foreach=\"ctx['partner_leads']\" t-as=\"lead\"><a t-att-href=\"lead['lead_link']\" t-out=\"lead['lead_id'].name or 'Subject Undefined'\">Subject Undefined</a>, <t t-out=\"lead['lead_id'].partner_name or lead['lead_id'].contact_name or 'Contact Name Undefined'\">Contact Name Undefined</t>, <t t-out=\"lead['lead_id'].country_id and lead['lead_id'].country_id.name or 'Country Undefined'\">Country Undefined</t>, <t t-out=\"lead['lead_id'].email_from or 'Email Undefined' or ''\">Email Undefined</t>, <t t-out=\"lead['lead_id'].phone or ''\">+1 650-123-4567</t> </li><br/>\n"
" </ol>\n"
" <t t-if=\"ctx.get('partner_in_portal')\">\n"
" Please connect to your <a href=\"{{ record.get_portal_url() }}\">Partner Portal</a> to get details. On each lead are two buttons on the top left corner that you should press after having contacted the lead: \"I'm interested\" &amp; \"I'm not interested\".<br/>\n"
" Please connect to your <a t-att-href=\"'%s' % (object.get_base_url())\">Partner Portal</a> to get details. On each lead are two buttons on the top left corner that you should press after having contacted the lead: \"I'm interested\" &amp; \"I'm not interested\".<br/>\n"
" </t>\n"
" <t t-else=\"\">\n"
" You do not have yet a portal access to our database. Please contact\n"
......@@ -281,9 +281,9 @@ msgid ""
" <tr><td valign=\"middle\" align=\"left\" style=\"opacity: 0.7;\">\n"
" <t t-out=\"user.company_id.phone or ''\">+1 650-123-4567</t>\n"
" <t t-if=\"user.company_id.phone and (user.company_id.email or user.company_id.website)\">|</t>\n"
" <a t-if=\"user.company_id.email\" t-attf-href=\"'mailto:%s' % {{ user.company_id.email }}\" style=\"text-decoration:none; color: #454748;\" t-out=\"user.company_id.email or ''\">info@yourcompany.com</a>\n"
" <a t-if=\"user.company_id.email\" t-att-href=\"'mailto:%s' % user.company_id.email\" style=\"text-decoration:none; color: #454748;\" t-out=\"user.company_id.email or ''\">info@yourcompany.com</a>\n"
" <t t-if=\"user.company_id.email and user.company_id.website\">|</t>\n"
" <a t-if=\"user.company_id.website\" t-attf-href=\"'%s' % {{ user.company_id.website }}\" style=\"text-decoration:none; color: #454748;\" t-out=\"user.company_id.website or ''\">http://www.example.com</a>\n"
" <a t-if=\"user.company_id.website\" t-att-href=\"'%s' % user.company_id.website\" style=\"text-decoration:none; color: #454748;\" t-out=\"user.company_id.website or ''\">http://www.example.com</a>\n"
" </td></tr>\n"
" </table>\n"
" </td>\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment