diff --git a/addons/sale_crm/crm_lead.py b/addons/sale_crm/crm_lead.py index 80ddc53a874..77c05f1be2b 100644 --- a/addons/sale_crm/crm_lead.py +++ b/addons/sale_crm/crm_lead.py @@ -12,11 +12,12 @@ class crm_lead(models.Model): def _get_sale_amount_total(self): total = 0.0 nbr = 0 + company_currency = self.company_currency or self.env.user.company_id.currency_id for order in self.order_ids: if order.state in ('draft', 'sent'): nbr += 1 if order.state not in ('draft', 'sent', 'cancel'): - total += order.currency_id.compute(order.amount_untaxed, self.company_currency) + total += order.currency_id.compute(order.amount_untaxed, company_currency) self.sale_amount_total = total self.sale_number = nbr