[FIX] sale_crm: opporunities quotes & sales buttons count
A `sale.order` is considered a quote when `draft` or `sent`, not just draft. Before this revision, a `sent` quotation was took into account in the amount total of sales, not in the number of quotes. opw-668340
This commit is contained in:
@@ -13,9 +13,9 @@ class crm_lead(models.Model):
|
||||
total = 0.0
|
||||
nbr = 0
|
||||
for order in self.order_ids:
|
||||
if order.state == 'draft':
|
||||
if order.state in ('draft', 'sent'):
|
||||
nbr += 1
|
||||
if order.state not in ('draft', 'cancel'):
|
||||
if order.state not in ('draft', 'sent', 'cancel'):
|
||||
total += order.currency_id.compute(order.amount_untaxed, self.company_currency)
|
||||
self.sale_amount_total = total
|
||||
self.sale_number = nbr
|
||||
|
||||
Reference in New Issue
Block a user