[FIX]Convert to opportunity do not shown lead/opp with state done, remove invisible of user_id in views
bzr revid: dle@openerp.com-20130208104713-8tg3n6yui3wgsd2o
This commit is contained in:
parent
19c93540ce
commit
0333d5954f
|
@ -58,11 +58,11 @@ class crm_lead2opportunity_partner(osv.osv_memory):
|
|||
|
||||
if partner_id:
|
||||
# Search for opportunities that have the same partner and that arent done or cancelled
|
||||
ids = lead_obj.search(cr, uid, [('partner_id', '=', partner_id)])
|
||||
ids = lead_obj.search(cr, uid, [('partner_id', '=', partner_id), ('state', '!=', 'done')])
|
||||
for id in ids:
|
||||
tomerge.add(id)
|
||||
if email:
|
||||
ids = lead_obj.search(cr, uid, [('email_from', 'ilike', email[0])])
|
||||
ids = lead_obj.search(cr, uid, [('email_from', 'ilike', email[0]), ('state', '!=', 'done')])
|
||||
for id in ids:
|
||||
tomerge.add(id)
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<field name="email_from"/>
|
||||
<field name="phone"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -67,7 +67,7 @@
|
|||
<field name="email_from"/>
|
||||
<field name="phone"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<field name="email_from"/>
|
||||
<field name="phone"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
|
Loading…
Reference in New Issue