[MERGE] fix few crm issue
bzr revid: tfr@openerp.com-20110420152955-8pae1j13cgfqpv2h
This commit is contained in:
parent
8de084aeb7
commit
e0c7efa201
|
@ -454,9 +454,9 @@ class crm_case(object):
|
|||
"""
|
||||
for case in self.browse(cr, uid, ids, context=context):
|
||||
if not destination and not case.email_from:
|
||||
raise osv.except_osv(_('Error!'), ("Partner Email is not specified in Case"))
|
||||
return False
|
||||
if not case.user_id.user_email:
|
||||
raise osv.except_osv(_('Error!'), ("User Email is not specified in Case"))
|
||||
return False
|
||||
|
||||
if destination and case.section_id.user_id:
|
||||
case_email = case.section_id.user_id.user_email
|
||||
|
|
|
@ -68,6 +68,8 @@ class crm_merge_opportunity(osv.osv_memory):
|
|||
ids = list(set(ids) - set(context.get('lead_ids', False)) )
|
||||
lead_obj = self.pool.get('crm.lead')
|
||||
op_id = lead_obj.search(cr, uid, [('id', 'in', ids)], order='create_date' , context=context)
|
||||
if not op_id:
|
||||
return False
|
||||
opps = lead_obj.browse(cr, uid, [op_id[0]], context=context)
|
||||
return opps[0]
|
||||
|
||||
|
|
Loading…
Reference in New Issue