[FIX] website_crm_partner_assign: fix template variable usage
Fixed error on rendering template of email_template_lead_forward_mail when clicking Forward to partner. Issue is 'dict' object has no attribute 'lead_id'. This was because in Odoo v14, jinja was used and using a dict like properties was ok. With QWeb it crashes and we have to correctly handle the dict. Fixes #79492 Task-2657930 closes odoo/odoo#80259 X-original-commit: 7facd634328ad2038a13f75a3616b753e8fef147 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
committed by
Thibault Delavallée
parent
82763d81bf
commit
b27d1176f8
@@ -37,7 +37,7 @@
|
||||
Hello,<br/>
|
||||
We have been contacted by those prospects that are in your region. Thus, the following leads have been assigned to <t t-out="ctx['partner_id'].name or ''"></t>:<br/>
|
||||
<ol>
|
||||
<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/>
|
||||
<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" & "I'm not interested".<br/>
|
||||
|
||||
Reference in New Issue
Block a user