Skip to content
Browse files

[FIX] crm_iap_lead_enrich: correctly get payload

Before this commit, int was compared to a string when trying to retrieves company data in the payload.

Part of 2069155

closes #36601

Signed-off-by: Rémi Rahir (rar) <>
  • Loading branch information...
pro-odoo committed Sep 6, 2019
1 parent 6c7c97a commit 4242ddd7a8e5b979a3dc679dacd8e5c29edb4c2b
Showing with 3 additions and 3 deletions.
  1. +1 −1 addons/crm_iap_lead_enrich/models/
  2. +2 −2 addons/crm_iap_lead_enrich/tests/
@@ -68,7 +68,7 @@ def _iap_enrich_from_response(self, iap_response):
:param iap_response: dict{lead_id: company data or False}
for lead in[('id', 'in', list(iap_response.keys()))]): # handle unlinked data by performing a search
iap_data = iap_response.get(
iap_data = iap_response.get(str(
if not iap_data:
lead.message_post_with_view('crm_iap_lead_enrich.mail_message_lead_enrich_notfound', subtype_id=self.env.ref('mail.mt_note').id)
@@ -41,9 +41,9 @@ def _contact_iap(local_endpoint, params):
raise exceptions.AccessError(
'The url that this service requested returned an error. Please contact the author of the app. The url it tried to contact was ' + local_endpoint
result[lead_id] = dict(sim_result)
result[str(lead_id)] = dict(sim_result)
if email_data and email_data.get(email):
return result


0 comments on commit 4242ddd

Please sign in to comment.
You can’t perform that action at this time.