[IMP] crm: count won opportunities on partner form

Customer form opportunity state Button now counts all opportunities
of related customer, except archived one.
This commit is contained in:
rap-odoo
2016-02-09 10:45:37 +01:00
committed by David Monjoie
parent 7f9e51283b
commit 52193c4953
+1 -1
View File
@@ -16,7 +16,7 @@ class res_partner(osv.osv):
operator = 'child_of'
else:
operator = '='
opp_ids = self.pool['crm.lead'].search(cr, uid, [('partner_id', operator, partner.id), ('type', '=', 'opportunity'), ('probability', '<', '100')], context=context)
opp_ids = self.pool['crm.lead'].search(cr, uid, [('partner_id', operator, partner.id), ('type', '=', 'opportunity')], context=context)
res[partner.id] = {
'opportunity_count': len(opp_ids),
'meeting_count': len(partner.meeting_ids),