Skip to content
Snippets Groups Projects
Commit 2fe4d3e7 authored by Aurélien Warnon's avatar Aurélien Warnon
Browse files

[FIX] website_crm_partner_assign: fix opportunities portal page without currency


Follow-up of 13a45447

Where we fixed the portal *list* of opportunities but did not notice that the
associated *form* also had the same issue.

To recap the issue:

When you remove the 'company_id' on a crm.lead, you also remove the computed
'company_currency'.
When trying to view this kind of leads in the website_crm_partner_assign portal
form page, it would raise an error while trying to display the planned_revenue
in the missing currency.

Now, we display the number without any currency sign, which is a "best effort"
solution, just the same as on the crm.lead form view.
So it will look like "9000 at 47%" instead of "$9000 at 47%".

Task-2444539

closes odoo/odoo#64933

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 9294c1dc
No related branches found
No related tags found
No related merge requests found
......@@ -532,7 +532,9 @@
<div class="col-lg-5 mb-4 mb-lg-0">
<div class="border-bottom d-flex justify-content-between py-2 mb-3 align-items-center">
<h5 class="mb-0">
<span class="text-nowrap" t-esc="opportunity.planned_revenue" t-options="{'widget': 'monetary', 'display_currency': opportunity.company_currency}"/> at
<span t-if="opportunity.company_currency" class="text-nowrap" t-esc="opportunity.planned_revenue" t-options="{'widget': 'monetary', 'display_currency': opportunity.company_currency}"/>
<span t-else="" class="text-nowrap" t-esc="opportunity.planned_revenue"/>
<span> at </span>
<span class="badge badge-info badge-pill"><span t-field="opportunity.probability"/>%</span>
</h5>
<button type="button" data-toggle="modal" data-target=".modal_edit_opp" class="btn btn-link btn-sm"><i class="fa fa-pencil mr-1"/>Edit</button>
......
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