Anaƫl Closson (openerp) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-fix-random-opp-state-acl into 
lp:openobject-addons/7.0.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-fix-random-opp-state-acl/+merge/141756

[FIX] only probability > 0 for stage assigned to leads into opportunities. 

When converted, the right stage was not found because it don't take the 
probability into account. Leads where sometime set to lost instead of the first 
stage. 


-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-fix-random-opp-state-acl/+merge/141756
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openobject-addons/trunk-fix-random-opp-state-acl into 
lp:openobject-addons/7.0.
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py	2012-12-28 14:39:12 +0000
+++ crm/crm_lead.py	2013-01-03 13:58:23 +0000
@@ -680,9 +680,9 @@
             section_id = lead.section_id and lead.section_id.id or False
 
         if section_id:
-            stage_ids = crm_stage.search(cr, uid, [('sequence','>=',1), ('section_ids','=', section_id)])
+            stage_ids = crm_stage.search(cr, uid, [('sequence', '>=', 1), ('section_ids', '=', section_id), ('probability', '>', 0)])
         else:
-            stage_ids = crm_stage.search(cr, uid, [('sequence','>=',1)])
+            stage_ids = crm_stage.search(cr, uid, [('sequence', '>=', 1), ('probability', '>', 0)])
         stage_id = stage_ids and stage_ids[0] or False
 
         return {

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to