From a148e2a47a347e61004f21c1daf8db55c8fc1eb1 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 8 Dec 2015 16:13:55 +0100 Subject: [PATCH] [FIX] sale: team bar values for sent quotations The "Quotation" bar in the sales team dashboard excluded sent quotation, it only included draft quotation. A `sale.order` in the state `sent` must be considered as a quotation, the only different is that it has been sent by mail to the customer, that's all. opw-658861 --- addons/sale/sales_team.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sales_team.py b/addons/sale/sales_team.py index a9f8fa6b482..d80fe387300 100644 --- a/addons/sale/sales_team.py +++ b/addons/sale/sales_team.py @@ -21,7 +21,7 @@ class crm_case_section(osv.osv): res = {} for id in ids: res[id] = {} - created_domain = [('section_id', '=', id), ('state', '=', 'draft'), ('date_order', '>=', date_begin), ('date_order', '<=', date_end)] + created_domain = [('section_id', '=', id), ('state', 'in', ['draft', 'sent']), ('date_order', '>=', date_begin), ('date_order', '<=', date_end)] validated_domain = [('section_id', '=', id), ('state', 'not in', ['draft', 'sent', 'cancel']), ('date_order', '>=', date_begin), ('date_order', '<=', date_end)] res[id]['monthly_quoted'] = json.dumps(self.__get_bar_values(cr, uid, obj, created_domain, ['amount_total', 'date_order'], 'amount_total', 'date_order', context=context)) res[id]['monthly_confirmed'] = json.dumps(self.__get_bar_values(cr, uid, obj, validated_domain, ['amount_untaxed', 'date_order'], 'amount_untaxed', 'date_order', context=context))