[FIX] {website_}crm: fix tracebacks while merging leads
Before this commit, if we try to merge crm leads and few of the details are not available, traceback was thrown. For ex- - When lead does not have a company or the company does not have currency set - When the visitor name is not set This commit fixes both of the tracebacks and thus allows users to merge the leads in these cases. taskID-2745017 closes odoo/odoo#84656 X-original-commit: eda3f43dde8122aa5f572f57bf2c3c0d94abe1f2 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -13,19 +13,22 @@
|
||||
<div t-if="lead.expected_revenue">
|
||||
<span>Expected Revenues:</span>
|
||||
<span t-if="lead.expected_revenue">
|
||||
<span t-field="lead.expected_revenue"
|
||||
<span t-if="lead.company_currency" t-field="lead.expected_revenue"
|
||||
t-options='{"widget": "monetary", "display_currency": lead.company_currency}'/>
|
||||
<span t-else="" t-out="lead.expected_revenue"/>
|
||||
<span t-if="lead.recurring_revenue" groups="crm.group_use_recurring_revenues"> + </span>
|
||||
</span>
|
||||
<span t-if="lead.recurring_revenue" groups="crm.group_use_recurring_revenues">
|
||||
<span t-field="lead.recurring_revenue"
|
||||
<span t-if="lead.company_currency" t-field="lead.recurring_revenue"
|
||||
t-options='{"widget": "monetary", "display_currency": lead.company_currency}'/>
|
||||
<span t-else="" t-out="lead.recurring_revenue"/>
|
||||
<span t-field="lead.recurring_plan.name"/>
|
||||
</span>
|
||||
</div>
|
||||
<div t-elif="lead.recurring_revenue" groups="crm.group_use_recurring_revenues">
|
||||
<span t-field="lead.recurring_revenue"
|
||||
<span t-if="lead.company_currency" t-field="lead.recurring_revenue"
|
||||
t-options='{"widget": "monetary", "display_currency": lead.company_currency}'/>
|
||||
<span t-else="" t-out="lead.recurring_revenue"/>
|
||||
<span t-field="lead.recurring_plan.name"/>
|
||||
</div>
|
||||
<div t-if="lead.probability">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<xpath expr="//div[@name='marketing']" position="inside">
|
||||
<div t-if="lead.visitor_ids">
|
||||
Web Visitors: <t t-out="', '.join(lead.visitor_ids.mapped('name'))"/>
|
||||
Web Visitors: <t t-out="', '.join(lead.visitor_ids.mapped('display_name'))"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user