[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
This commit is contained in:
Denis Ledoux 2015-12-08 16:13:55 +01:00
parent 7f20b79188
commit a148e2a47a
1 changed files with 1 additions and 1 deletions

View File

@ -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))