summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Warnon <awa@odoo.com>2021-01-22 14:20:48 +0000
committerAurélien Warnon <awa@odoo.com>2021-01-27 14:41:57 +0000
commitc3007ac621d95ee487560a95eeaf925b56c01ab7 (patch)
tree7291a6b4557f0ca18d2a232c9430fe575610f47c
parent4212f84da83257419d6d98038220ce1dc322fb04 (diff)
[FIX] website_crm_partner_assign: fix opportunities portal page without currency
Follow-up of 13a4544707053295565c33580526f6a8a16f556b 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#65141 X-original-commit: 2fe4d3e79958aca99eb3a8f110972fa25ee4a1c3 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
-rw-r--r--addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml b/addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml
index cb5468e5dc5..3285d5dc2e1 100644
--- a/addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml
+++ b/addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml
@@ -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.expected_revenue" t-options="{'widget': 'monetary', 'display_currency': opportunity.company_currency}"/> at
+ <span t-if="opportunity.company_currency" class="text-nowrap" t-esc="opportunity.expected_revenue" t-options="{'widget': 'monetary', 'display_currency': opportunity.company_currency}"/>
+ <span t-else="" class="text-nowrap" t-esc="opportunity.expected_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>