Skip to content
Snippets Groups Projects
Commit 342ab378 authored by Aurélien Warnon's avatar Aurélien Warnon Committed by Thibault Delavallée
Browse files

[IMP] crm_iap_lead_enrich: ease testing for the enrich service

Testing the enrich service was not possible since the endpoint was hardcoded.
This commit introduces a config parameter that allows overriding it.

Done in preparation of task 2081471.

PR #40349
Task 2081471
parent 96207218
Branches
Tags
No related merge requests found
......@@ -16,7 +16,8 @@ class IapEnrichAPI(models.AbstractModel):
dbuuid = self.env['ir.config_parameter'].sudo().get_param('database.uuid')
params['account_token'] = account.account_token
params['dbuuid'] = dbuuid
return iap.jsonrpc(self._DEFAULT_ENDPOINT + local_endpoint, params=params, timeout=300)
base_url = self.env['ir.config_parameter'].sudo().get_param('enrich.endpoint', self._DEFAULT_ENDPOINT)
return iap.jsonrpc(base_url + local_endpoint, params=params, timeout=300)
@api.model
def _request_enrich(self, lead_emails):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment