Skip to content
Snippets Groups Projects
Commit 68f3ed65 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] crm: convert to opportunity, avoid overwrite user defined action default

parent 79e01f0f
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
tomerge.extend(self._get_duplicated_leads(cr, uid, partner_id, email, include_lost=True, context=context))
tomerge = list(set(tomerge))
if 'action' in fields:
if 'action' in fields and not res.get('action'):
res.update({'action' : partner_id and 'exist' or 'create'})
if 'partner_id' in fields:
res.update({'partner_id' : partner_id})
......
......@@ -89,7 +89,7 @@ class crm_partner_binding(osv.osv_memory):
res = super(crm_partner_binding, self).default_get(cr, uid, fields, context=context)
partner_id = self._find_matching_partner(cr, uid, context=context)
if 'action' in fields:
if 'action' in fields and not res.get('action'):
res['action'] = partner_id and 'exist' or 'create'
if 'partner_id' in fields:
res['partner_id'] = partner_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment